Hello,
You can clear the data by assigning an empty item to the DataSource, take a look at the following code:
var items = []; chart1.setDataSource(items);
Using arrays is a quick way of passing data to the chart, please refer to the sample below:
var items = [ {"Value": 9}, {"Value": 15}, {"Value": 21}, {"Value": 26}, {"Value": 35} ]; chart1.setDataSource(items);
I hope this helps.