[Enterprise Risk Management] highcharts xrange issue

[Enterprise Risk Management] highcharts xrange issue

  
Forge Component
(4)
Published on 30 Nov (2 weeks ago) by Paul Davies
4 votes
Published on 30 Nov (2 weeks ago) by Paul Davies

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

@Paul

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

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?


You better ask that to Brendan Eich...

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.