Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个正确渲染的 jqplot 条形图。该图表有 2 个系列的数据,一个呈现为蓝色,另一个呈现为红色。当我启用 pointLabels 插件以在条形上方输出条形值时,文本将以默认页面字体颜色呈现。我希望字体每次都使用条形的颜色。
谢谢。
看起来点标签是根据它们的系列来分类的。所以第一个系列中的点标签会有一个名为 的类jqplot-series-0,第二个系列会有一个类,jqplot-series-1以此类推。只需使用一些 CSS 来定位它们,它应该可以工作。
jqplot-series-0
jqplot-series-1
.jqplot-series-0 { color: red; }