cdogstu99
Posts: 3
Joined: Sun Aug 05, 2012 8:10 pm

Issues With Date On Highcharts Stock

I'm following the sample Highcharts Stock example with the data format [date, price]

My chart is loading but I'm having issues with the date part of the chart. Here's a view of what chart looks like:

https://ibb.co/WkTTYqr

When i view the data it looks like this:

0: (2) ['1493596800000', 964.8599853516]
1: (2) ['1496275200000', 908.7299804688]
2: (2) ['1498867200000', 930.5]
3: (2) ['1501545600000', 939.3300170898]
4: (2) ['1504224000000', 959.1099853516]
5: (2) ['1506816000000', 1016.6400146484]
6: (2) ['1509494400000', 1021.4099731445]

The only difference I can see is that the date has single quotes around it whereas in the sample data, there are no quotes.

Would removing those quotes somehow do the trick?

That's other issue, not sure how to do this in JS.

Any help would be hugely appreciated.
cdogstu99
Posts: 3
Joined: Sun Aug 05, 2012 8:10 pm

Re: Issues With Date On Highcharts Stock

I'm all set, just used a parseInt on the date string and is working fine. Thanks!
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: Issues With Date On Highcharts Stock

Hi cdogstu99,

Glad to hear you have figured it out! In case of any further questions, feel free to contact us again.

Regards!
Mateusz Bernacik
Highcharts Developer

Return to “Highcharts Stock”