Skip to content


Different color for bars in on graph #971

Globegitter opened this Issue · 2 comments

2 participants


Right now there doesn't really seem to be an easy way to have a different for different bars in one simple graph. I found this plugin:, which would probably even work in my case, but I would need something different.
It would be amazing, if it would be possible when you define the bars, e.g. like this:
bars: { show: true, fillColor: "rgba(170, 70, 67, 0.4)", fill: true }
that you could just have an array for fillColor, e.g. fillColor: ["rgba(170, 70, 67, 0.4)", "rgba(0, 0, 0, 0.4)", "rgba(0, 70, 67, 0.4)"] and if there are fewer bars than the number of elements, it just ignores the rest and if there are too many bars, it should start at the beginning of the array again.
I think if that could be implemented at some point, it would make that plugin much more useful. Cheers

Flot member

Hmm I'm not sure I understand; couldn't you just create more than one series? It would be only a few characters more code than listing out the colors.


Ok, I don't know if I had thought of that before and you are right it does the job, but the reason why I thought that would be a good idea of doing for example the way I described, because I don't know beforehand how may graphs I will have to draw and it would just make things much simpler, especially for quick prototyping.
In any case, thank you for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.