开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜