Chart library (TimeLine) shows Axis Dates off by 1 month

25 views
Skip to first unread message

JAda_1111

unread,
Oct 25, 2021, 5:03:32 PM10/25/21
to Google Visualization API
Hey all,

Ran into a strange problem - it appears that the rendered chart is showing Dates for November, but all the input data is for October.

Here's a JS Fiddle:  https://jsfiddle.net/ep28r9u0/1/

If I change one of the Dates in the JS data object to be November dates, then the axis shows November & December, not October and November like it should be.

Any ideas as to what's going on here?

JAda_1111

unread,
Nov 1, 2021, 2:39:36 PM11/1/21
to Google Visualization API
Oh goodness... it's an easy one, but a crucial detail that I missed:  JS numbers Months from 0.  So my 2021,10,06 means 11th Month = November.  Doh!

I changed the Month #s in my data and it works correctly now.
Reply all
Reply to author
Forward
0 new messages