Dear concern,
I need to draw dynamic graph. That’s why need to feed a json in data.
Please check out below code snippet.
$scope.chart = new CanvasJS.Chart(“chartContainer”, {
theme: ‘theme1’,
title:{
text: “Test Graph”
},
axisY: {
title: “million units”,
labelFontSize: 16,
},
axisX: {
labelFontSize: 16,
},
data: [$scope.mineData]
});
And $scope.mineData contains below json data.
{
type: “bar”,
showInLegend: true,
name: “GOLD”,
color: “gold”,
dataPoints: [
{
label: “Test”,
y: 100
}
]
}
Problem is graph is not showing.
Please any one help. Thanks in advance.