Highcharts图形中错误的日期显示

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

我有一个图表,描绘了802。000年前的数据。但是,我无法成功使Highcharts理解日期时间设置...我尝试使用不同的年份格式(例如“ -800000”或“ Date.UTC(-800000,01,01)”)尝试,但徒劳无功。

x轴未显示正确的年份...enter image description here

xaxis设置就是

type:"datetime"

数据看起来像这样:

Date.UTC(1975,01,01),,329.4,,331.08,3.336.116.667,,,,,

Here is a fiddle

感谢任何提示。

datetime highcharts label axis
1个回答
0
投票

请检查此主题的最小和最大日期:Minimum and maximum date

因为这是一个普通的日期问题,所以建议您使用category轴类型:

xAxis: {
    type: "category",
}

实时演示: https://jsfiddle.net/BlackLabel/vwnuqmch/

API参考: https://api.highcharts.com/highcharts/xAxis.type

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