I am trying to run following canvas JS code, and new to Canvas JS
alert(“inside before onload function ()”);
window.onload = function () {
alert(“start function ()”);
var chart = new CanvasJS.Chart(“chartContainer”, {
title: {
text: “Column Chart in JSP using CanvasJS”
},
data: [
{
type: “column”,
dataPoints: [
{ label: “DCS”, y: 10 },
{ label: “WXM”, y: 15 },
{ label: “CCM”, y: 25 },
{ label: “Archival”, y: 30 },
{ label: “Total”, y: 28 }
]
}
]
});
alert(“before chart render”);
chart.render();
alert(“after chart render”);
}
not displaying chart after alert of start function() onload. not getting any error also on console..
-
This topic was modified 1 year, 10 months ago by Mvk4atos.