dataGrouping with xAxis datetime

亡梦爱人 提交于 2019-12-12 05:19:23

问题


I wonder if it's possible with xAxis type datetime set this

pointStart: Date.UTC(2010, 0, 1),
pointInterval: 24 * 3600 * 1000, // one day

But if I want a dataGrouping option by week dynamically I can't see here: http://jsfiddle.net/L7d5d8fj/


回答1:


dataGrouping will work on Highstock chart only: http://www.highcharts.com/docs/advanced-chart-features/data-grouping

As an answer to your problem with showing lines and columns in your chart (discussion in comments) You can set your approximation manually, so you will be sure that both of your series types have the same approximation:

  dataGrouping: {
    approximation: "average",
    enabled: true,
    forced: true,
    units: [
      ['week', [1]]
    ]
  }

Here you can see an example how it can work: https://jsfiddle.net/ezhp5a4j/4/



来源:https://stackoverflow.com/questions/39646494/datagrouping-with-xaxis-datetime

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!