Different colors on bar chart depending on value?
I am wanting to set the bars a different colour depending on their values using the JQPlot jquery chart plugin.
E.g. the rendered bars will be colored with RED if the value of the bar is 13 and over开发者_运维问答
the rendered bars will be colored with YELLOW if the value of the bar is between 10 - 12
the rendered bars will be colored with BLUE if the value of the bar is less than 10
Is this possible and what would an example snippet be? I can't seem to find much information online.
Thanks
Take a look at the answer given here. I'm not sure if it works but it might point you in the right direction. Basically, it's about overriding the jqPlot color generator and return a color based on the value of the bar.
精彩评论