fillColor not behaving as documented for points #1179

Closed
john-mark-wilkinson opened this Issue Nov 1, 2013 · 2 comments

Comments

Projects
None yet
2 participants

An accurate description of the bug can be found here: https://groups.google.com/forum/#!topic/flot-graphs/urs7PXO-WD8

Essentially, the documentation states:

fillColor {[Color][api-documentation-colours]}
The colour used to fill in series points. Unlike lines.fillColor, this cannot be used to specify a gradient. The default value is white. If not specified, the series colour is used to fill in the point.

This, however, is inaccurate. fillColor, when not specified, simply fills the points in with white.

After a bit of searching, it appears that the documentation is both correct and in conflict with itself. It defaults the value of fillColor to white, making it so that even when not specified, fillColor is white and thus the points are white. My suggested change is to simply default fillColor to null so that it will use the series color properly.

On that same note, in the function getFillStyle, I suggested the default alpha be changed to 1, as it is confusing and difficult to see that there is any color at all with the default being 0.4.

These two changes taken together will make the points in Flot behave as expected.

dnschnur was assigned Nov 4, 2013

Owner

dnschnur commented Nov 4, 2013

What version of Flot are you using? I tested this in 0.8.1, and it works as expected, and as described in the docs: the default is white, but if you specify null as the fillColor then it uses the color of the series instead.

I don't feel strongly about the default alpha, but that would be a breaking (if minor) change; plots depending on that value would have to update their options. I don't think the benefit is worth it at this point, and changing the alpha using the 'fill' option is described fairly well in the docs.

dnschnur closed this Nov 4, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment