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;
}
精彩评论