gpt4 book ai didi

javascript - highCharts flags - 从系列上的标志中删除线

转载 作者:行者123 更新时间:2023-12-01 20:17:31 25 4
gpt4 key购买 nike

我需要将 highStock 图表上的标志中的线条删除到该系列,但我不知道如何才能做到这一点。

highCharts drop lines from flags

我检查了highCharts flags我知道它具有数据的 Y 属性,但这不是我需要的,首先因为 Y 只是标志数量的一个,而且因为 Y 值本身与 Y 轴比例无关。

我还检查了xAxis.plotLines但那些到 xAxis 或 yAxis 的线,我需要这些线像屏幕截图一样停在系列上。

这是系列和标志的代码:

series: [{
type: 'area',
name: seriesName,
data: seriesData,
id: 'dataseries'
},
{
type: 'flags',
data: chartFlags,
stackDistance: 20,
width: 16,
"shape": "url(http://www.highcharts.com/demo/gfx/sun.png)"
}]

有什么建议吗?

最佳答案

你看过plotOptions.flags.onSeries吗? ?这看起来似乎可以解决问题。

onSeries: String The id of the series that the flags should be drawn on. If no id is given, the flags are drawn on the x axis. Defaults to undefined. Defaults to undefined.

使用示例:

series: [{
type: 'area',
name: seriesName,
data: seriesData,
id: 'dataseries'
},
{
type: 'flags',
data: chartFlags,
onSeries: seriesName,
stackDistance: 20,
width: 16,
"shape": "url(http://www.highcharts.com/demo/gfx/sun.png)"
}]

关于javascript - highCharts flags - 从系列上的标志中删除线,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32334712/

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