var data = google.visualization.arrayToDataTable([]);
methods But the result is same. Can Anybody help me on this?
Here is how I'm adding values to chart
Method 1. var data = new google.visualization.DataTable();
data.addColumn('string', 'Store');
data.addColumn('number', 'Type');
data.addRows([
{% for category in categories %}
{% if loop.last %}
['{{ category.name }}', {{ category.survey }}]
{% else %}['{{ category.name }}', {{ category.survey }}],
{% endif %}
{% endfor %}
]);
Method 2. var data = google.visualization.arrayToDataTable([
['Task', 'Hours per Day'],
{% for category in categories %} ['{{ category.name }}', {{ category.survey }}],
{% endfor %}
]);