Edit this page

setDataSource

Sets the data source of the widget.

Parameters

dataSource kendo.data.DataSource

The data source to which the widget should be bound.

Example - set the data source

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  dataSource: [
    { value: 1 },
    { value: 2 }
  ],
  series: [
    { field: "value" }
  ]
});
var chart = $("#chart").data("kendoChart");
var dataSource = new kendo.data.DataSource( {
  data: [
    { value: 3 },
    { value: 4 }
  ]
});
chart.setDataSource(dataSource);
</script>
Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy