简体   繁体   English

jqplot单个pointLabels

[英]jqplot individual pointLabels

I'd like to set different pointLabel settings for each bar, so if a value is small like 1, it will show location: 'e' instead of location: 'w'. 我想为每个条设置不同的pointLabel设置,因此,如果值小如1,它将显示位置:“ e”而不是位置:“ w”。 I'm trying the following... 我正在尝试以下...

series: [{pointLabels: {show: true, location: 'e'}},
         {pointLabels: {show: true, location: 'w'}}]

just as a test, but it doesn't seem to work. 只是作为测试,但似乎无效。 Should I remove the seriesDefaults block? 我应该删除seriesDefaults块吗?

Thanks! 谢谢!

It should work fine the way you try it. 尝试它的方式应该可以正常工作。 Do not worry about the seriesDefaults its setting get overwritten by those in series . 不要担心seriesDefaults它的设置得到由那些覆盖series Here is the code sample presenting it working. 这是展示其工作原理的代码示例。 In the sample the four of the chart labels are set to show in different locations. 在示例中,四个图表标签设置为在不同位置显示。

If you still have the issue please build a sample presenting the problem, for example, at http://jsfiddle.net so we can see it. 如果您仍然遇到问题,请例如在http://jsfiddle.net上构建一个介绍问题的示例,以便我们查看。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM