开发者

How do I make the point label match the bar colour in jqplot?

I have a jqplot bar开发者_开发问答chart rendering correctly. The chart has 2 series of data, one is is rendered blue and the other is rendered red. When I enable the pointLabels plugin to output the bar value above the bar the text is rendered in the default page font colour. I would like the font to use the colour of the bar each time.

Thanks.


It looks like the point labels are given classes based on their series. So point labels in the first series will have a class called jqplot-series-0, the second series will have jqplot-series-1 and so on. Just target them with some CSS and it should work.

.jqplot-series-0 {
    color: red;
}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜