This is my code
var chartInstall = new CanvasJS.Chart(“chartInstall”, {
animationEnabled: true,
title: {
//text: “Ice Cream Sales Over a Month”
},
axisX:[
{
lineColor: “#369EAD”,
titleFontColor: “#369EAD”,
labelFontColor: “#369EAD”,
valueFormatString: “MMM DD”,
intervalType: “day”,
interval: 2
},
{
lineColor: “#C24642”,
titleFontColor: “#C24642”,
labelFontColor: “#C24642”,
valueFormatString: “MMM DD”,
intervalType: “day”,
interval:2
}],
axisY: {
title: “Installs”,
prefix: “”,
includeZero: false
},
data: [{
type: “spline”,
//axisXIndex: 0, //Defaults to Zero
name: “Axis Y-1”,
showInLegend: true,
legendText: “Current Period”,
xValueType: “dateTime”,
dataPoints: @Html.Raw(ViewBag.DataInstall1)
},
{
type: “spline”,
axisXIndex: 1, //Defaults to Zero
showInLegend: true,
legendText: “Previous Period”,
xValueType: “dateTime”,
dataPoints: @Html.Raw(ViewBag.DataInstall2)
}
]
});
chartInstall.render();
ViewBag.DataInstall1 = [{“x”:1532476800000.0,”y”:1.0},{“x”:1532563200000.0,”y”:1.0}]
ViewBag.DataInstall2 = [{“x”:1530144000000.0,”y”:1.0}]
why in second click display no chart display?