Home › Forums › Chart Support › A variable for dataPoints › Reply To: A variable for dataPoints

#10498

@justxtasy,

You can build datapoints JSON as shown below.

$.each(data, function (i, item) {
    dps.push({label: item.ProfileName, y: item.TotalCustomer});
});

Please take a look at this JSFiddle for an example.
Chart with Data from JSON

—
Vishwas R
Team CanvasJS