Highstock From / To Invalid Date Issue

I had a problem creating a graph with the "Price" axis, and for "Tom" itโ€™s the same as in the example on the Highstock website. It shows the axis of the volume just fine, but not the price.

When I tried to determine the cause of the problem, I disabled the volume, and the "From" and "To" rects in the upper right corner indicate "Invalid date", but they were in the same format, era for a millisecond, like volume.

So here is my setup:

chart = new Highcharts.StockChart({ chart: { renderTo: 'container', alignTicks: false }, rangeSelector: { selected: 1 }, title: { text: 'Price Graph' }, yAxis: [{ title: { text: 'Prices' }, height: 200, lineWidth: 2 }], series: [ seriesOptions ] }); 

And here is the "data" for seriesOptions:

 [[1362434092000, 20.3], [1362434093000, 13.1], [1362434199000, 7.01], [1362434200000, 9.4], [1362434796000, 7.23], [1362434797000, 22.4], [1362434798000, 13.1], [1362434835000, 9.9], [1362435142000, 9.2], [1362435399000, 6.4], [1362435400000, 13.5], [1362435401000, 24.8], [1362435453000, 6.4]] 

UPDATE

Not sure if this will be useful, but found on line 292, it doesn't seem to work here:

 this[a+"Input"].value=xa(c.inputEditDateFormat||"%Y-%m-%d",this[a+"Input"].HCTime); 

HCTime is undefined here, so on line 20 where this function is defined:

 xa=function(a,b,c){if(!s(b)||isNaN(b))return"Invalid date"; 

Hope this helps ...

UPDATE 2

With the information in the seriesOptions variable seriesOptions I tried to bring things to the basics and updated the series as follows:

 series : [{ lineWidth : 2, marker : { enabled : true, radius : 2 }, shadow : true, tooltip : { valueDecimals : 2 }, type: 'line', name : 'Test', pointInterval : 15 * 1000, data : [ [[1362434092000, 20.3], [1362434093000, 13.1], [1362434199000, 7.01], [1362434200000, 9.4], [1362434796000, 7.23], [1362434797000, 22.4], [1362434798000, 13.1], [1362434835000, 9.9], [1362435142000, 9.2], [1362435399000, 6.4], [1362435400000, 13.5], [1362435401000, 24.8], [1362435453000, 6.4] ]] }] 

This has a slightly different result, which I hope can help someone find out what the problem is - it also creates an empty space for the graph, but From and To say January 1, 1970. "Improvement with "Invalid date", but still, it makes no sense to me when the Epoch Converter website shows the correct translation on Tuesday, March 5, 2013 at 8:54 a.m. - What does this mean?

UPDATE 3

This question has come a long time ago, and I got a -1 charts, which I'm not sure why I deserve. Therefore, to help explain a little more, I took the following two screenshots:

Hope this helps ... It drives me crazy, and the studies that I have done only make sure that the timestamp of the era is in milliseconds.

We will be very, very grateful for the help in this riddle - I almost finished this stage of the project, and it has been a long time.

Greetings.

+4
source share
1 answer

The problem is resolved.

The main problem was that chart = new Highcharts.StockChart({ was called twice in the script, the contents of the container chart = new Highcharts.StockChart({ before each attempt. At the first iteration, it had data to work with, the second time it was not. Therefore, NaN according to the data.

The second problem, seriesOptions itself was an array, so I foolishly made a series: array series: array of arrays.

I have an unusual problem when the slider overlaps the axis of the volume, but I will find out.

0
source

All Articles