You must be logged in to post your query.
Home › Forums › Feature Requests & Feedback › How to use json in data
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.
@reazulhaque20,
It seems like you are not calling the render method on the chart. If this is not your case, can you please create a jsfiddle reproducing the issue, so that we can look into it and help you out better?
___ Suyash Singh Team CanvasJS
You must be logged in to reply to this topic. Login/Register