This is my Models code:
public class graph_user
{
public List<int> year { get; set; }
}
This is my Views code side:
@model IEnumerable testing.Models.graph_user
function generateChart() {
var data = new google.visualization.DataTable();
for (i = 0; i < year.length; i++) {
data.addColumn('string',);
data.addRow();
}
}
Basically I want to obtains the values from list year from within the Models to the javascript which is seen declared in my views.
graph_userorIEnumerable<graph_user>?