luftikus143
luftikus143

Reputation: 1285

Wrong date display in Highcharts graph

I have a graph which portrays data 802.000 years back in time. However, I don't succeed in making Highcharts understand the datetime setting... I tried it with different year formatting, such as "-800000" or "Date.UTC(-800000,01,01)", but in vain.

The xaxis doesn't show the correct years... enter image description here

The xaxis setting is just

type:"datetime"

The data look like this:

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

Here is a fiddle.

Thanks for any hints.

Upvotes: 0

Views: 232

Answers (1)

ppotaczek
ppotaczek

Reputation: 39139

Please check this thread about minimum and maximum date: Minimum and maximum date

Because that is a general date issue, I recommend you to use a category axis type:

xAxis: {
    type: "category",
}

Live demo: https://jsfiddle.net/BlackLabel/vwnuqmch/

API Reference: https://api.highcharts.com/highcharts/xAxis.type

Upvotes: 1

Related Questions