Key colors not matching chart colors

Share RGraph:   Share or Like RGraph on Facebook!

« Back to message list

Enter your email address to get email updates on this topic. You can stop receiving updates by clicking the link in the update email messages.

Posted by Joshua McKinnon on 4th June 2013
Hello. I have been trying to get the legend (key) colors to match the chart colors and it doesn't seem to be working. I have tried putting an array of colors in (which works if the array is the same size as the data) but it only works for single dimension arrays. I need it to work for 2D array data like this:

chart data: [[11512.47,12206.74,12870.13,12576.07,13966.97,15147.64,13977.59],[3953.67,4257.94,4153.58,4143.43,4779.88,4453.83,4390.51],[11073.28,11115.63,11904.29,12189.86,13235.39,12973.72,12786.95],[2283.24,2715.27,2433.62,2812.41,2984.53,3610.32,3727.86],[3502.23,3559.77,3518.34,3789.13,4507.41,6331.31,4631.44],[5029.44,5383.02,4995.17,5121.26,6077.47,6126.61,5353.62]]
key: ["1663","2165","2736","3195","3549","4938"]


I've tried it on the horizontal/vertical bar and line charts. On the line chart, the first 2 match but the rest don't.
Posted by RGraph support on 4th June 2013
Hi there,

Well try usin chart.key.colors to specify your own colors for the key and also post a URL to an example so that I can see what you're talking about.



Richard, RGraph Support

Add a reply




« Back to message list