Home forums Using CanvasJS dynamic data points

This topic contains 1 reply, has 2 voices, and was last updated by  Sunil Urs 2 years, 6 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #6333

    saidesh
    Participant

    var chart = new CanvasJS.Chart(“chartContainer”, {

    title:{
    text: “Fruits sold in First Quarter”
    },
    data: [//array of dataSeries
    { //dataSeries object

    /*** Change type “column” to “bar”, “area”, “line” or “pie”***/
    type: “column”,
    dataPoints: [
    { label: “banana”, y: 18 },
    { label: “orange”, y: 29 },
    { label: “apple”, y: 40 },
    { label: “mango”, y: 34 },
    { label: “grape”, y: 24 }
    ]
    }
    ]
    });

    chart.render();

    here orange,apple are not dynamically buliding, if i want some dynamical data in chart how can i pass

    #6337

    Sunil Urs
    Keymaster

    Here is an example.

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

You must be logged in to reply to this topic.