In KendoUI chart, when aggregating series data for a category, one would expect that the dataItem for the point would contain all the actual data points used to construct that dataItem. Since the point on the graph is an aggregate, its reasonable to assume that more than one piece of data was used to construct it.
For example, given the series data:
[
{'Operation': 'A', 'Cost': 2.5, 'StartTime':'2014-04-02T00:00:00-07:00'},
{'Operation': 'B', 'Cost': 2.5, 'StartTime':'2014-04-02T00:00:00-07:00'},
{'Operation': 'C', 'Cost': 3, 'StartTime':'2014-04-03T00:00:00-07:00'},
{'Operation': 'D', 'Cost': 3, 'StartTime':'2014-04-03T00:00:00-07:00'}
]
Where categoryField is 'StartTime', (value) field is 'Cost' and aggregate is 'sum', we can then assume that we will have 2 data points on the graph:
2014-04-02 = 5
2014-04-03 = 6
When we look at the dataItem for the first point (in a tooltip for example), we would assume that somehow 'A' and 'B' would be represented. However the data point looks like 'A', with 'Cost' set to the aggregate of A+B.
So it seems instead of returning the set of items in the point aggregate, kendo is doing some sort of weird merging of the point (probably just taking the first) and merging in the aggregate.
Take a look at this example, when hovering the chart item, look at the console output for the dataItem. Also note series.data is now missing B and D respectively.
http://trykendoui.telerik.com/@jsconnell@2ndwatch.com/ASEM
Am I wrong to make this assumption, or is this a bug?
For example, given the series data:
[
{'Operation': 'A', 'Cost': 2.5, 'StartTime':'2014-04-02T00:00:00-07:00'},
{'Operation': 'B', 'Cost': 2.5, 'StartTime':'2014-04-02T00:00:00-07:00'},
{'Operation': 'C', 'Cost': 3, 'StartTime':'2014-04-03T00:00:00-07:00'},
{'Operation': 'D', 'Cost': 3, 'StartTime':'2014-04-03T00:00:00-07:00'}
]
Where categoryField is 'StartTime', (value) field is 'Cost' and aggregate is 'sum', we can then assume that we will have 2 data points on the graph:
2014-04-02 = 5
2014-04-03 = 6
When we look at the dataItem for the first point (in a tooltip for example), we would assume that somehow 'A' and 'B' would be represented. However the data point looks like 'A', with 'Cost' set to the aggregate of A+B.
So it seems instead of returning the set of items in the point aggregate, kendo is doing some sort of weird merging of the point (probably just taking the first) and merging in the aggregate.
Take a look at this example, when hovering the chart item, look at the console output for the dataItem. Also note series.data is now missing B and D respectively.
http://trykendoui.telerik.com/@jsconnell@2ndwatch.com/ASEM
Am I wrong to make this assumption, or is this a bug?