gpt4 book ai didi

jqplot - 在 jqplot 中打开和关闭 pointLabels

转载 作者:行者123 更新时间:2023-12-01 01:18:09 26 4
gpt4 key购买 nike

我正在尝试以编程方式打开和关闭 pointLabels。我认为它会像这样工作:

    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();

但是,这仍会显示点标签。

谢谢你的帮助!

最佳答案

虽然这篇文章很旧,但我找到了解决问题的方法:

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 - 在 jqplot 中打开和关闭 pointLabels,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10810030/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com