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 ] ]

I can't figure out, what is wrong in the provided format or is it the way I 
use google.visualization.arrayToDataTable.

Thx for your help !

-- 
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/279a46a2-fcee-4a4d-a50e-222c32c792cbn%40googlegroups.com.

Reply via email to