Hello,
I want to use one DataSource for different components like pie charts, bar charts and grids. So, if I set a filter on my UI all displayed widgets would refresh.
Example DataSource:
var dataSource = new kendo.data.DataSource({
data: [
{project: "Project A", budget: 700, task: "Task A"},
{project: "Project A", budget: 50, task: "Task B"},
{project: "Project B", budget: 250, task: "Task C"}
]
});
A pie chart may display the total budget for each project. The chart would show the following data: Project A - 75%; Project B - 25%.
A bar chart may display the budget for each task. The data would be: Task A - 700, Task B - 50, Task C - 250.
And a grid may display the raw data without grouping ect.
My problem is that the DataSource seems not to fit this requirement, because a grouping and aggregation for the pie chart seems not to be possible. Is the DataSource designed to be shared among different modules? I want to avoid coding grouping, aggregation and filtering on my own, because the widget I am developing must provide much more components than pie chart, bar chart and grid with different filters and grouping the end user should attach/detach.