axis labels for data chart

5 posts, 1 answers
  1. Boris Gheihman
    Boris Gheihman avatar
    12 posts
    Member since:
    May 2007

    Posted 25 Mar 2015 Link to this post

    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.
  2. T. Tsonev
    Admin
    T. Tsonev avatar
    2817 posts

    Posted 27 Mar 2015 Link to this post

    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!
     
  3. Answer
    T. Tsonev
    Admin
    T. Tsonev avatar
    2817 posts

    Posted 27 Mar 2015 Link to this post

    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!
     
  4. Boris Gheihman
    Boris Gheihman avatar
    12 posts
    Member since:
    May 2007

    Posted 01 Apr 2015 Link to this post

    Thanks!
  5. T. Tsonev
    Admin
    T. Tsonev avatar
    2817 posts

    Posted 03 Apr 2015 Link to this post

    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!
     
Back to Top