gpt4 book ai didi

javascript - Highcharts/Highstock 标志系列问题

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

为什么提款系列中的所有标志都没有显示?请参阅以下 JS fiddle :https://jsfiddle.net/lucianpurcarea/5zxa0jsm/13/

这是为提款系列创建数据数组的部分:

var withdrawalsFlags = [];
for (var w = 0; w < response.withdrawals.length; w++) {
var title = "W:" + response.withdrawals[w][1] + "$";
withdrawalsFlags.push({
"x": response.withdrawals[w][0],
"id": (response.withdrawals[w][0]),
"title": title
});
}

在我准备的 fiddle 中,提款系列的“标题”由“W:”+美元值(value)+“$”组成。在这种情况下,我会在该系列中看到大约 5 个标志。如果我删除“W:”我会看到更多,如果我删除最后的“$”我会看到它们全部。

如果我放大一个特定部分,我会看到该部分中存在的所有标志。

预先感谢任何人看到这个!

最佳答案

所有标志均未显示,因为在 Highcharts flags 类型系列中具有属性 allowOverlapX默认设置为 false

Highcharts 文档:

If false, the flags are moved sideways using an algorithm that seeks to place every flag as close as possible to its original position.

设置allowOverlapX = true,您将看到所有标志。

演示:https://jsfiddle.net/BlackLabel/509anv32/1/

关于javascript - Highcharts/Highstock 标志系列问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53437956/

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