jQuery UI Widgets › Forums › Chart › jqxChart series of 6th series takes the same color as first one
Tagged: chart, javascript chart, jquery chart, jqwidgets chart
This topic contains 3 replies, has 2 voices, and was last updated by Hristo 7 years ago.
-
Author
-
Please look at the following jsfiddle chart example.
I have 6 series in column chart and the color of the first and sixth series is same (or at least it looks same with naked eye)https://jsfiddle.net/f8bvh070/1/
Please note, in my chart i am having generating series dynamically and I have given user, an ability to change color scheme so I may not be able to supply hard coded color of a specific series.
Any help would be appreciated.
Thanks
AbhiHello Abhi,
Thank you for the interest.
You could create a custom color schemes for your needs.
Another approach will be to usecolorFunction
callback function that you could implement to each one series and add the desired color.
Please, take a look at this topic:
https://www.jqwidgets.com/community/topic/colorfunction-in-chart/#post-87436
Also, I would like to say that you could usegetColorScheme
method and could check them and rearrange it:
var schemeColors = $('#chartContainer').jqxChart('getColorScheme', 'scheme01');
About “how to set custom color scheme” you could look at this topic:
http://www.jqwidgets.com/community/topic/pie-chart-custom-colors/#post-5639Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.comHi Hristo
Thanks for the suggestions. In my scenario, I have a dropdown with all the color scheme defined and end user selects the color scheme.
So not sure how much I can use from your suggestions? Besides I don’t have fixed number of series, Series gets created dynamically based on data tooeven getColorScheme method returns the first 5 colors of the scheme so not sure either, how can I change the color of 6th series in particular?
Regards,
AbhiHello Abhi,
I would suggest you another way it is a little bit harder but you have full control is to set your color scheme.
On that way, you are sure there are no repeated colors and they will be in the desired consistency and colorfulness.
Please, take a look at this topic:
http://www.jqwidgets.com/community/topic/set-colors-based-on-datafield-values/#post-54313Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.