Hello,

I found that if I use "date" format and custom format like:
 hAxis.format: 'MM dd YYYY',

there is bug that dates starting from Dec 26 2021 are displayed as Dec 26 
2022.

If I use format: 'MM dd yyyy' - everything works good. 

YYYY - not documented, but works, so it confuses and could lead to such 
bugs.

Example:

      var data = new google.visualization.DataTable();
      data.addColumn('date', 'Date');
      data.addColumn('number', 'Dogs');

      data.addRows([
        [new Date(2021,11,25), 0],   [new Date(2021,11,26), 10], [new 
Date(2021,11,27), 5]
      ]);

      var options = {
        hAxis: {
          title: 'Time',
          format: 'MM dd YYYY', // <--------------- !!! should be yyyy
        },
        vAxis: {
          title: 'Popularity'
        },
        backgroundColor: '#f1f8e9'
      };

      var chart = new 
google.visualization.LineChart(document.getElementById('chart_div'));
      chart.draw(data, options);

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-visualization-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/afd040d8-d20f-4155-9aff-4bd85bb62a00n%40googlegroups.com.

Reply via email to