ASP.NET MVC
window.onload=function () {
$.ajax({
type: "POST",
url: '@Url.Action("chart","Home")',
async: false,
success: function (data) {
var resp = eval("" + data + "");
var chart = $("#Container").ejChart("instance");
chart.model.series = [];
for (var i = 0; i < 6; i++) {
chart.model.series.push({ dataSource: resp[i].points });
chart.model.series[i].xName = "index";
}
chart.model.series[0].yName = "parameterX";
chart.model.series[1].yName = "parameterY";
chart.model.series[2].yName = "parameterZ";
chart.model.series[0].yAxisName = "yAxis1";
chart.model.series[1].yAxisName = "yAxis1";
chart.model.series[2].yAxisName = "yAxis1";
chart.model.series[3].yName = "inputX";
chart.model.series[4].yName = "inputY";
chart.model.series[5].yName = "inputZ";
chart.redraw();
},
});
}
|