在 Highstock 图表中,无论间隙的时间间隔如何,任何间隙都将始终具有相同的宽度(似乎是点之间最小距离的宽度),从而导致时间/x 轴变窄,而这并不会这不会发生在“导航”系列中。
是否有任何简单的方法可以使图表根据其持续时间保留间隙的间距,就像导航栏中已经发生的那样(从而保持 x 轴不缩小)?
最佳答案
标准 Highstock 图表默认使用序数 x 轴。
In an ordinal axis, the points are equally spaced in the chart regardless of the actual time or x distance between them. This means that missing data for nights or weekends will not take up space in the chart. Defaults to true.
您可以尝试通过将 xAxis.ordinal 设置为 false http://api.highcharts.com/highstock/xAxis.ordinal 来禁用此参数。
xAxis: {
ordinal: false
},
关于javascript - 保留 Highstock 图表中缺口的时间间隔比率,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39632659/