This is a migrated thread and some comments may be shown as answers.

axis labels for data chart

4 Answers 63 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Boris Gheihman
Top achievements
Rank 1
Boris Gheihman asked on 25 Mar 2015, 10:44 AM
I'm not sure how dataItem parameter is chosen for labels template. The biggest problem with data chart I have is that I need to render the latest date value from the series for given time span. And it seems that kendo always provide beginning of time span. Therefore I've overridden categoryAxis.labels.template. I've also added aggregate function to series to get latest value. But it seems that kendo ignores aggregate function for labels calculation. I've made a small example to illustrate the issue. http://dojo.telerik.com/oTiYA

I want to render this values for category axis:
2014-05-27T21:00:00.000Z
2014-06-24T21:00:00.000Z
2014-07-29T21:00:00.000Z

But if I use dataItems I just get first n values from the series:
2014-05-20T21:00:00.000Z
2014-05-27T21:00:00.000Z
2014-06-03T21:00:00.000Z

I'm not really sure how to resolve the issue. It may be not so critical in this example as I can always revert to default rendering. But if it needs to be combined by the week it really becomes a big issue for me.

4 Answers, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 27 Mar 2015, 11:46 AM
Hi,

Thank you for reporting this problem.
The series labels use the data items from before calculating aggregates.

We'll investigate and try to fix this issue. I can't suggest a workaround.
Apologies for the caused inconvenience.

I've updated our Telerik points as a token of gratitude for your involvement.

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
Accepted
T. Tsonev
Telerik team
answered on 27 Mar 2015, 02:14 PM
Hi,

Just a quick update. The fix was completed and the internal builds from next week should include it.
The data items for the labels will behave in identical way to the series data items.

By default you'll get the first data item from the group.
If a custom aggregate is defined you'll get the object returned from it.

I hope this helps.

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
Boris Gheihman
Top achievements
Rank 1
answered on 01 Apr 2015, 08:38 AM
Thanks!
0
T. Tsonev
Telerik team
answered on 03 Apr 2015, 08:35 AM
Hello,

Welcome. Let me know if you have any problems with the updated build.

Regards,
T. Tsonev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Charts
Asked by
Boris Gheihman
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Boris Gheihman
Top achievements
Rank 1
Share this question
or