高图表数据分组在缩放时不考虑所有值

问题描述 投票:1回答:1

缩放时,highstock数据分组错误。我正在分析一天中每小时的数据。

没有缩放的数据分组

enter image description here

数据分组与缩放

enter image description here

正如您在图像时刻3和16中看到的那样,不再具有之前的yAxis和值。

有人可以让我知道这里有什么问题吗?

fiddle - highstock data grouping with zoom

{
      type: 'column',
      name: 'Stock Volume',
      color: 'red',
      data: data, 
      dataGrouping: {
          forced: true,
          units: [['hour', [1]]],
          approximation: 'sum',
      }
        }
javascript typescript charts highcharts highstock
1个回答
1
投票

series.getExtremesFromAll设置为true解决了我的问题。

通常,只有可见范围内的点被分组,超出极值的点不会被计算在内。在文档中,他们只提到yAxis极端,但它也会影响数据分组。

series: [{
            type: 'column',
            name: 'AAPL Stock Volume',
            color: 'red',
            data: data, 
            getExtremesFromAll: true,
            dataGrouping: {
           forced: true,
          units: [['hour', [1]]],
          approximation: 'sum',
      }
        }]

fiddle

github issue link

© www.soinside.com 2019 - 2024. All rights reserved.