Hi there,
Is that possible to create a chart in the same way which is shown in this example (http://demos.telerik.com/kendo-ui/dataviz/bar-charts/grouped-stacked-bar.html) but where both stack and group properties are read from a JSON file?
I'm not able to set "stack" property from data loaded from datasource.
Thanks in advance for your response.
Best regards.
JL
Is that possible to create a chart in the same way which is shown in this example (http://demos.telerik.com/kendo-ui/dataviz/bar-charts/grouped-stacked-bar.html) but where both stack and group properties are read from a JSON file?
I'm not able to set "stack" property from data loaded from datasource.
Thanks in advance for your response.
Best regards.
JL
5 Answers, 1 is accepted
0
Hello,
A bindable stack field is on our to-do list and we hope to have it implemented soon.
For the time being you need to process the data manually and build the series in advance.
Apologies for the caused inconvenience.
Regards,
T. Tsonev
Telerik
A bindable stack field is on our to-do list and we hope to have it implemented soon.
For the time being you need to process the data manually and build the series in advance.
Apologies for the caused inconvenience.
Regards,
T. Tsonev
Telerik
DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.
0
Luca
Top achievements
Rank 1
Iron
answered on 07 Jan 2016, 10:33 PM
Hi,
Has this been added in the new version of Kendo UI? I've got the same problem, I need to bind both series and stacks from JSON in order to have the same result of your grouped-stacked-bar DEMO.
Also it would been nice to have the ability to add an array of colors by serie, since the stack is bound from remote data, the number of them can always change.
Thanks
Luca
0
Hi,
It turned out it's not practical to implement a stack field in the way we saw it initially.
Our recommendation is to use series grouping and assign stacks in the dataBound event:
dataBound: function(e) {
var series = e.sender.options.series;
for (var i = 0; i < series.length; i++) {
series[i].stack = series[i].data[0].stack;
}
}
This assumes all data points in a series have the same stack.
See this snippet for a demo.
Regards,
T. Tsonev
Telerik
It turned out it's not practical to implement a stack field in the way we saw it initially.
Our recommendation is to use series grouping and assign stacks in the dataBound event:
dataBound: function(e) {
var series = e.sender.options.series;
for (var i = 0; i < series.length; i++) {
series[i].stack = series[i].data[0].stack;
}
}
This assumes all data points in a series have the same stack.
See this snippet for a demo.
Regards,
T. Tsonev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Hello,
I've created a how-to article for this scenario as well. See Stacked and Grouped Series Bound to Remote Data.
Regards,
T. Tsonev
Telerik
I've created a how-to article for this scenario as well. See Stacked and Grouped Series Bound to Remote Data.
Regards,
T. Tsonev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Luca
Top achievements
Rank 1
Iron
answered on 13 Jan 2016, 02:02 PM
Hello
Thank you so much for your quick reply and the new post on the Documentation library.
This is exactly what I was looking for.
Best Regards
Luca