I am currently working on a dynamic line chart that needs to be able to adjust the number of lines (Standard, Latest, Earliest, Average) based on the database records. My code structure is similar to this example.
function drawChart() {
var data = google.visualization.arrayToDataTable([
['Month', 'Standard', 'Latest', 'Earliest', 'Average'],
['Original Documents', @Convert.ToDecimal(@Standard[0].ToString()), @Convert.ToDecimal(@Latest[0].ToString()), @Convert.ToDecimal(@Earliest[0].ToString()), @Convert.ToDecimal(@Average[0].ToString())],
["Filing of Entries", @Convert.ToDecimal(@Standard[1].ToString()), @Convert.ToDecimal(@Latest[1].ToString()), @Convert.ToDecimal(@Earliest[1].ToString()), @Convert.ToDecimal(@Average[1].ToString())],
["Assessment of Duties", @Convert.ToDecimal(@Standard[2].ToString()), @Convert.ToDecimal(@Latest[2].ToString()), @Convert.ToDecimal(@Earliest[2].ToString()), @Convert.ToDecimal(@Average[2].ToString())],
["Payment of Duties", @Convert.ToDecimal(@Standard[3].ToString()), @Convert.ToDecimal(@Latest[3].ToString()), @Convert.ToDecimal(@Earliest[3].toString()), Convert.ToDecimal(@Average[3].ToString())],
["Releasing", Convert.ToDecimal(@Standard[4].toString()), Convert.ToDecimal(@Latest[4].ToString()), Convert.ToDecimal(@Earliest[4].toString()), Convert.ToDecimal(@Average[4].toString())],
["Gate Pass", Convert.ToDecimal(@Standard[5].toString()), Convert.ToDecimal(@Latest[5].toString()), Convert.ToDecimal(@Earliest[5].toString()), Convert.ToDecimal(@Average[5].toString())],
["Delivery", Convert.ToDecimal(@Standard[6].toString()), Convert.ToDecimal(@Latest[6].toString()), Convert.ToDecimal(@Earliest[6].toString()), Convert.ToDecimal(@Average[6].toString())]
]);