35
Views
4
Comments
[Enterprise Risk Management] highcharts xrange issue
Question
enterprise-risk-management
Web icon
Forge asset by Davies March

It looks like we have found an issue with the highcharts xrange.  This can be seen also in there demo

. If you look at the demo on there site for xrange they set up the first range date as

data: [{

x: Date.UTC(2014, 10, 21),

x2: Date.UTC(2014, 11, 2),

y: 0,

partialFill: 0.25

ie 21st of October 2014 to 2nd of November 2014

however when charted


Ie is one month forward 21st of November 2014 to 2nd of December 2014

We have raised this with Highcharts

2018-05-16 11-16-36
João Heleno
 
MVP

@Paul

Months in JavaScript go from 0=January to 11=December. Looks good to me.

UserImage.jpg
Paul Davies

João Heleno wrote:

@Paul

Months in JavaScript go from 0=January to 11=December. Looks good to me.

That it interesting what is the origin of that design decision? and why does that not apply to years and days?


2018-05-16 11-16-36
João Heleno
 
MVP

You better ask that to Brendan Eich...

UserImage.jpg
Paul Davies

João Heleno wrote:

You better ask that to Brendan Eich...

I'll just drop him a cheeky email then ;)  Digging around the documentation I can see the argument for storing months as an array with index starting at zero.  Is just seems counterintuitive when you are working in multiple programming languages.  


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.