Set x-axis range in tall charts

I have several time series that do not have the same start / end points. I want to fix the start point and end point on the x axis, I tried something like:

xAxis: { min: new Date('2000/10/22'), max: new Date('2010/10/22'), }, 

jsfiddle link

But that will not work. Btw, a document on a high-standard website has the wrong link for min in xAis .

+4
source share
1 answer

Min and max should be timestamps, not date objects.

The correct code is:

  xAxis: { min: new Date('2000/10/22').getTime(), max: new Date('2010/10/22').getTime(), }, 

http://jsfiddle.net/34CZK/3/

+11
source

Source: https://habr.com/ru/post/1493450/


All Articles