gpt4 book ai didi

ruby - 在 StockChart 中以编程方式显示多个系列的工具提示(highchart)

转载 作者:数据小太阳 更新时间:2023-10-29 08:32:57 25 4
gpt4 key购买 nike

我正在制作股票图表,我想以编程方式将高库存工具提示显示为 asked here .

我设法解决了这个问题,但现在,我的目标是显示所有系列的工具提示(当我用鼠标选择一个点时的行为相同 - 请检查 this example)。

这可能吗?

这里是关键代码(more code):

xchart.tooltip.refresh([xchart.series[0].points[i]]);
//DOESN'T WORK
//chart.tooltip.refresh([chart.series.points[i]]);
//DOESN'T WORK ALSO
//chart.tooltip.refresh([chart.series[0].points[i]]);
//chart.tooltip.refresh([chart.series[1].points[i]]);

最佳答案

只需为工具提示启用共享。并通过提供要在工具提示上显示的数组点来刷新两个系列的工具提示。

tooltip : {
valueDecimals : 2,
shared: true
}

xchart.tooltip.refresh([xchart.series[0].points[i], xchart.series[1].points[i]]);

http://jsfiddle.net/cf7wq/5/

并且似乎仅通过 api 本身不可能显示两个不同的工具提示而不共享。

http://highslide.com/forum/viewtopic.php?f=9&t=12670

关于ruby - 在 StockChart 中以编程方式显示多个系列的工具提示(highchart),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14686719/

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