Highchart xaxis日期以数字格式显示

时间:2018-07-17 13:42:46

标签: date highcharts

enter image description here

在X轴中显示日期时出现Highcharts问题highcharts将日期转换为数字格式。

尝试以下代码,但工作正常:

“ xAxis”:[      {      “ type”:“ datetime”,     “标签”: {      “格式”:“ {值:%Y-%m-%d}”     }     }     ]

1 个答案:

答案 0 :(得分:0)

我还没有看到完整的应用程序代码,但是很可能尝试将plotOptions.series.cropThreshold设置为等于您的点数以上的值,这将解决此问题。例如:

plotOptions: {
  series: {
    cropThreshold: 1000
  }
}

API参考:https://api.highcharts.com/highcharts/plotOptions.series.cropThreshold