I have reproduced this issue in here ... http://dojo.telerik.com/@Salmal/OcALi
I am implementing Kendo Charts for my AngularJS application . I have a scenario where i need to change the type of the Chart when user clicks on a button .
For this i am using k-series-defaults attribute directive and for its value i am binding a scope variable from controller . Please see below code snippets.
View.html
<
div
class
=
"demo-section k-content wide"
>
<
div
>
<
h4
>Hover some series</
h4
>
<
div
kendo-chart
k-legend
=
"{ position: 'bottom' }"
k-series-defaults
=
"{ type: 'pie' }"
k-series
=
"[{ field: 'amount', categoryField: 'name'}]"
k-data-source
=
"chartData"
k-rebind
=
"chartData"
>
</
div
>
</
div
>
</
div
>
Ctrl.js
$scope.chartData = [
{
"name": "Books",
"amount": 200
},
{
"name": "Newspapers",
"amount": 320
},
{
"name": "Magazines",
"amount": 225
},
{
"name": "Shoes",
"amount": 400
}
];
$scope.update = function () {
$scope.ChartType = { type: 'bar' };
};
$scope.ChartType = { type: 'pie' };
My problem is that , the ChartType variable change doesn't reflect in the chart rendered in the view . Which means that the AngularJS 2 way binding doesn't work with the kendo ui charts . Is there something i am missing here , or can we use some alternatives such as ObservableArray as specified here http://docs.telerik.com/kendo-ui/AngularJS/data-source#update-the-datasource-object . ?