Home Forums Feature Requests & Feedback How to use json in data

How to use json in data

Viewing 2 posts - 1 through 2 (of 2 total)
  • #14976

    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’,
    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.



    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

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.