gpt4 book ai didi

highcharts - 如何在 Highcharts 中以编程方式选择多个点或标记?

转载 作者:行者123 更新时间:2023-12-04 22:30:27 25 4
gpt4 key购买 nike

在 Highcharts 的默认情况下,如何以编程方式选择多个点或标记,例如 Shift + 单击图表?

最佳答案

您可以使用 Point.select 以编程方式选择多个点功能与 accumulate设置为 true .函数签名是( API ):

select ([Boolean select], [Boolean accumulate])

select: Boolean.When true, the point is selected. When false, the point is unselected. When null or undefined, the selection state is toggled.


accumulate: Boolean.When true, the selection is added to other selected points. When false, other selected points are deselected. Internally in Highcharts,selected points are accumulated on Control, Shift or Cmd clicking the point.


您的代码示例如下:
chart.series[0].data[0].select(true, true);
chart.series[0].data[1].select(true, true);
// ...
this JSFiddle demonstration它如何选择几个点。

关于highcharts - 如何在 Highcharts 中以编程方式选择多个点或标记?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28985834/

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