Sign in to follow this  

Multi Series Lines Atuo Coloring & Threshold Coloring

Recommended Posts

I'm using MSLine.swf for multi-series line chart. The total number of Categories/Datasets is unknown. This chart is for a new product being launched in new markets slowly over the next two years. So, when the data is queried, the number of markets returned will increase over time.


I removed explicit line coloring in the datasets and it looks likes FusionCharts is automatically choosing line colors (good).


I also need to display trendlines on the graph - or more specifically threshold ranges (like green >= 98% | yellow <98% and >= 90% | red < 90%).


My question is: With line colors being automatically selected, is it possible to exclude those trendline (threshold) colors? Hopefully that makes sense --- On a chart from 0% to 100% the entire background will be sections (thrednlines) of green/yellow/red). Since I have an unknown number of categories and have to allow Fusioncharts to automatically select line colors, can I prevent line colors that match or are too close to the trendline colors? Is FusionCharts smart enough to not use anything close to a set trendline color for a linecolor?


I'm guessing the only way around this might be for me to create a db table for hex line colors where I can pre-define a very long list of colors that don't clash with the trendline colors (where I could dynamically apply them in order for each new dataset inserted into the XML string).


Thanks for any advice.

Share this post

Link to post
Share on other sites



As of now, for lines chart uses a pre defined set of colors (these colors work independently and apart from trennd-line colors) which you can also modify using paletteColors attribute. It takes comma separated hex colors. So, all you would need to do is to define this attribute with a set of colors which do not conflict with your trendline colors.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this