voidlabs / elycharts

Interactive Javascript (SVG|VML) Charting Library
http://elycharts.com
Other
10 stars 6 forks source link

Support color normalization for pie chart (color property for serie/values) #33

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
currently :
series : { root : { values : [
 { color : 'red' },
 { color : 'green' },
 { color : 'blue' },
] }},
doesn't work and we are forced to use:
series : { root : { values : [
 { color : 'red', plotProps : { fill : 'red' } },
 { color : 'green', plotProps : { fill : 'green' } },
 { color : 'blue', plotProps : { fill : 'blue' } },
] }},

We could do like line and bar chart and simply inherit pie colors from the 
"color" property if not defined differently.

Original issue reported on code.google.com by stefano....@gmail.com on 23 Jan 2014 at 9:12

GoogleCodeExporter commented 9 years ago
In order to correctly support this I had to rewrite the whole "color" logic so 
to compute it while drawing instead of the "configuration" phase.

Each plugin now computes derived properties on its own and the option struct is 
unchanged.

Original comment by stefano....@gmail.com on 23 Jan 2014 at 4:58