Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Different color for bars in on graph #971

Closed
Globegitter opened this Issue · 2 comments

2 participants

@Globegitter

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: https://github.com/flot/flot/blob/master/jquery.flot.threshold.js, 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

@dnschnur
Owner

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.

@Globegitter

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.