Hi,
I'd like to create an angular kendo stacked bar chart where the same key repeats multiple times.
To illustrate, I want to use the k-series and k-datasource like the following
<div kendo-chart
k-chart-area='{background:"", height:40, width:800}'
k-series-defaults="{ overlay: {gradient: 'none'},type: 'bar', markers: { visible: false }, stack: 'true' }"
k-series="[
{name: 'App Stopped', field: 'stoppedDuration', color: '#65c178', labels: {visible: 'true', position: 'left', background: ''} },
{name: 'App Started', field: 'runningDuration', color: '#5da2f7', labels: {visible: 'true', position: 'left', background: ''}}
]"
k-data-source="thismonthseventdata"
k-value-axis="{labels: { format: '{0}' }, visible: false, majorGridLines: { visible: false }, majorTicks: { visible: false, width: 0 }, axisCrossingValue:0}"
k-category-axis="{line: { visible: false }, majorGridLines: { visible: false }, majorTicks: { visible: false, width: 0 }}"
>
</div>
in the scope variable thismonthseventdata, I'd like to have the same key repeat itself. i.e
thismonthseventdata.data([{runningDuration:3, stoppedDuration:5, runningDuration:3}]);
This is however not possible since I cannot have a javascript object with duplicate keys. How can I achieve this with kendo stack charts and angular ?
I know I can do this with k-series only without a k-datasource but the data cannot bind to dynamic scope data.
Thanks,
Rajesh
I'd like to create an angular kendo stacked bar chart where the same key repeats multiple times.
To illustrate, I want to use the k-series and k-datasource like the following
<div kendo-chart
k-chart-area='{background:"", height:40, width:800}'
k-series-defaults="{ overlay: {gradient: 'none'},type: 'bar', markers: { visible: false }, stack: 'true' }"
k-series="[
{name: 'App Stopped', field: 'stoppedDuration', color: '#65c178', labels: {visible: 'true', position: 'left', background: ''} },
{name: 'App Started', field: 'runningDuration', color: '#5da2f7', labels: {visible: 'true', position: 'left', background: ''}}
]"
k-data-source="thismonthseventdata"
k-value-axis="{labels: { format: '{0}' }, visible: false, majorGridLines: { visible: false }, majorTicks: { visible: false, width: 0 }, axisCrossingValue:0}"
k-category-axis="{line: { visible: false }, majorGridLines: { visible: false }, majorTicks: { visible: false, width: 0 }}"
>
</div>
in the scope variable thismonthseventdata, I'd like to have the same key repeat itself. i.e
thismonthseventdata.data([{runningDuration:3, stoppedDuration:5, runningDuration:3}]);
This is however not possible since I cannot have a javascript object with duplicate keys. How can I achieve this with kendo stack charts and angular ?
I know I can do this with k-series only without a k-datasource but the data cannot bind to dynamic scope data.
Thanks,
Rajesh