JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://cdn.kendostatic.com/2012.3.1315/js/kendo.all.min.js"></script>
<link rel="stylesheet" href="http://cdn.kendostatic.com/2012.3.1315/styles/kendo.common.min.css">
<link rel="stylesheet" href="http://cdn.kendostatic.com/2012.3.1315/styles/kendo.default.min.css">
<link rel="stylesheet" href="http://cdn.kendostatic.com/2012.3.1315/styles/kendo.dataviz.min.css">
<div id="chart"
data-role="chart"
data-bind="source: returnData"
data-series-defaults='{"type": "column"}'
data-series='[{"field": "value"}]'
data-title='Break-up of Spain Electricity Production for 2008'
data-legend-position = 'bottom'>
</div>
<button onclick="changeData();">Change</button>
JavaScript
function changeData() {
viewModel.set("returnData", new kendo.data.DataSource({
data: [{
"country": "Hydro",
"value": 4
},{
"country": "Solar",
"value": 5
}]
}));
}
var data = [{
"country": "Hydro",
"value": 22
},{
"country": "Solar",
"value": 2
},{
"country": "Nuclear",
"value": 49
},{
"country": "Wind",
"value": 27
}];
var viewModel = kendo.observable({
data: data,
returnData: function() {
records = this.get("data");
return records;
}
});
kendo.bind($(document.body), viewModel);