Skip to content
Advertisement

How To dynamically Add row To Google Chart with for loop

I Have Problem in Google chart.

I am using asp.net Mvc. After I fetch data from controller, I pass it into Google chart .

When i use manual data, for example:

JavaScript

It Show me correctly .

But how can i add my data dynamically into Google chart ?

This is my code:

JavaScript

Advertisement

Answer

The way you are doing is wrong.You should do something like below:

JavaScript
Advertisement