My chart is defined as:
var lineChart = new CanvasJS.Chart("lineChartContainer", {
animationEnabled: true,
axisY :{
includeZero: false,
gridColor: "rgba(140, 140, 140, 1)"
},
toolTip: {
shared: true,
content: false
},
legend: {
fontSize: 13
},
data: lineChartData.json
});
And I’m trying to access the instance of the chart via its DOM element by any of the two methods:
var charr = $('#lineChartContainer').CanvasJS()
var charr = $('#lineChartContainer').CanvasJSChart()
The first says CanvasJS is not a function and the second returns an undefined object. I’m using the JQuery plugin. Please advise.
-
This topic was modified 3 years, 1 month ago by rr93.
-
This topic was modified 3 years, 1 month ago by Vishwas R.