简体   繁体   English

尖峰在Highstock中无法正确显示

[英]Spikes are not showing correctly in Highstock

I have a question regarding Highstock. 我对Highstock有疑问。 I am having a data recording Engine Load which has spikes in the dataset. 我正在记录引擎负载的数据,该负载在数据集中有峰值。 I am trying to chart this dataset in Highstock, but when the input data range is large (to a certain point) then the spikes won't be showing correctly in the chart. 我正在尝试在Highstock中绘制该数据集的图表,但是当输入数据范围较大(到特定点)时,峰值将无法在图表中正确显示。 Attached are the images for better explanation. 随附的图像可提供更好的说明。

Showing correctly when the date range is not large: 日期范围不大时可以正确显示: 在此处输入图片说明 NOT showing correctly when the data range is large: 数据范围较大时无法正确显示: 在此处输入图片说明

The two images are charting from the same dataset just with different range of time. 这两个图像是从同一数据集中以不同的时间范围绘制的。 Why this would happen in Highstock and how to get it fixed? 为什么在Highstock中会发生这种情况,以及如何解决?

Thank you in advance. 先感谢您。

I believe this has to do with HighStock doing some sort of aggregation when zoom in out/in past a certain threshold. 我相信这与HighStock在缩小/超过特定阈值时进行某种汇总有关。 This can be turned off by setting something like this: 可以通过设置以下内容将其关闭:

plotOptions: {
    series: {
        dataGrouping: {
            enabled: false
        }
    }
}

This tells HighStock to stop grouping x-Axis points together to get aggregates. 这告诉HighStock停止将x轴点分组在一起以获得聚合。 Check here for more info in dataGrouping. 在此处查看有关dataGrouping的更多信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM