I am trying to render a Calendar Chart, but I face a "n.getFullYear is not a function" error and I can't find what's going wrong.
This is my client part:
google.charts.load("current", {packages:["calendar"], callback:function(){ getIt(where.getAttribute('data-chart-uri'), function(status,response){ var data = google.visualization.arrayToDataTable(response,false); var options = Object.assign({title: where.getAttribute('data-chart-title')||''}, response.options); google.charts.setOnLoadCallback(function(){ var chart = new google.visualization.Calendar(where); chart.draw(data, options); }); }); }});Note: where is the targeted DOM Element and getIt is a fetch like function.
And this is what is sent by the web service (response):
[ [ { "label": "Date", "type": "date" }, { "label": "Number of individuals", "type": "number" } ], [ "2021-03-11", 1 ], [ "2021-03-24", 2 ], [ "2021-03-25", 1 ] ]