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

Skip to first unread message


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:

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?


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
0 new messages