[[Template core/front/global/follow is throwing an error. This theme may be out of date. Run the support tool in the AdminCP to restore the default theme.]]
I'm unable to set the color of series using the API when JChartFX's stylesheets are included.
Simple example: if I modify the presenter.js of the example "JS_Lines_and_Stripes_Charts.zip" by adding calls to the setColor method of both series and series border (see below), the palette defaults override my API calls (so nothing happens) until I comment out the line
from index.html. After the removal the API calls work ok. The same behavior is seen in our app where JChartFX is embedded in. What am I doing wrong?
functionLineChartWithMarkers(chart1){// test chart series color setting
chart1.getSeries().getItem(0).setColor("#000000");
chart1.getSeries().getItem(0).getBorder().setColor("#000000");
chart1.getSeries().getItem(1).setColor("#BB0000");
chart1.getSeries().getItem(1).getBorder().setColor("#BB0000");
chart1.getSeries().getItem(2).setColor("#00CC00");
chart1.getSeries().getItem(2).getBorder().setColor("#00CC00");// RELEVANT CODE
chart1.setGallery(cfx.Gallery.Lines);// END RELEVANT CODEPopulateCarProduction(chart1);var titles = chart1.getTitles();var title =new cfx.TitleDockable();
title.setText("Vehicles Production by Month");
titles.add(title);}
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
[[Template core/front/global/follow is throwing an error. This theme may be out of date. Run the support tool in the AdminCP to restore the default theme.]]
Question
timopu
Hi,
I'm unable to set the color of series using the API when JChartFX's stylesheets are included.
Simple example: if I modify the presenter.js of the example "JS_Lines_and_Stripes_Charts.zip" by adding calls to the setColor method of both series and series border (see below), the palette defaults override my API calls (so nothing happens) until I comment out the line
from index.html. After the removal the API calls work ok. The same behavior is seen in our app where JChartFX is embedded in. What am I doing wrong?
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.