wildanSawaludin / flot

Automatically exported from code.google.com/p/flot
MIT License
0 stars 0 forks source link

Standardize fill and fillColor across bar and pie charts #758

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Right now pie charts use "color" (color def) to define the inside color of each 
slice and "stroke.color" (color def) and "stroke.width" (number) to define the 
outer border.

Bar charts use color (color def) to define the outline color, fill (boolean) 
and fillColor (color def or gradient) to define the inner color and lineWidth 
(number) to define the outline width.

This is very inconsistent since both charts use colors semantically in the same 
way. I propose changing to:

color: color def. The color of the outline
lineWidth: number. The width of the line around the bar or slice.
fill: boolean. If the slice should be filled or not.
fillColor: color or gradient def. If fill is true then use this color/gradient 
to fill te slice/bar.

Basically change the piechart to use the barchart convention. While at it also 
adding radial gradients on piechart like I have proposed here (only using 
fillColor instead of color):
http://stackoverflow.com/a/12846527/3485

Also, if fill is true the legend should also use the same pattern. The outline 
of the legend should follow "color" and the inside should follow "fillColor" 
(with gradient effect if defined as such).

Original issue reported on code.google.com by hoff...@gmail.com on 15 Oct 2012 at 5:02