在jqplot中打开和关闭pointLabel [英] turning pointLabels on and off in jqplot
本文介绍了在jqplot中打开和关闭pointLabel的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试以编程方式打开和关闭pointLabels.我认为它可以像这样工作:
I am trying to turn pointLabels on and off programmatically. I thought it would work something like this:
var data_ = [[1,1],[2,5],[4,9]];
var graph = $.jqplot(id_graph, [data_], {
series:[{pointLabels: { show:true } }]
}
);
graph.series[0].pointLabels.show=false;
graph.replot();
但是,它仍然显示点标签.
However, this still displays the point labels.
感谢您的帮助!
推荐答案
虽然这篇帖子很旧,但我找到了解决问题的方法:
althoug this post is old I found a solution for the problem:
var data_ = [[1,1],[2,5],[4,9]];
var graph = $.jqplot(id_graph, [data_], {
series:[{pointLabels: { show:true } }]
}
);
graph.series[0].plugins.pointLabels.show=false;
graph.replot();
代替使用
graph.series[0].pointLabels.show=false;
使用
graph.series[0].plugins.pointLabels.show=false;
在我看来,这行得通.
这篇关于在jqplot中打开和关闭pointLabel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文