【问题标题】:Highcharts not creating correct amount of labels (steps) in xAxis only first and last labelsHighcharts 仅在第一个和最后一个标签中没有在 xAxis 中创建正确数量的标签(步骤)
【发布时间】:2020-12-06 10:30:22
【问题描述】:

这是我的问题的 jsFiddle:

Highcharts.chart('container', {
    
    xAxis: {
        categories: [full arrray in fiddle],
        labels: {
            step: 1
        }
    },

    series: [{
        data: Array.from(Array(690).keys())
    }]
});

https://jsfiddle.net/qws90dux/

图表好像只取第一个和最后一个标签,这是为什么呢?

【问题讨论】:

    标签: highcharts react-highcharts


    【解决方案1】:

    我认为这不起作用的原因是因为处理每个类别都是长日期所需的时间,这基本上是写的here 解决办法就是改用xAxis.tickInterval,间隔和以前一样。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-02-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-11-19
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多