Force Date axis not to aggregate values?

10 posts, 1 answers
  1. Raido Valgeväli
    Raido Valgeväli avatar
    26 posts
    Member since:
    May 2008

    Posted 14 May 2013 Link to this post

    Hi

    I have a data source of numeric value for every hour
    Line chart automatically aggregates it by day where I actually have space for every data point (and yes, users want to see them)
    http://70.43.83.4/test/html5/kendo.html

    When I set baseUnit manually to "hours", the labels on the axis would be a mess.
    1) Tried my luck with setting baseUnitStep to 24 but that would again aggregate/hide the hourly points.

    2) Tried Scatter chart
    http://70.43.83.4/test/html5/kendos.html
    there are other problems
    a) Category axis messes up dates
    b) Tooltip is visible only with mouse exactly on the marker (line chart uses x-axis-location comfortably)

    3) Stock chart http://70.43.83.4/test/html5/kendost.html
    a) also groups by date
    b) messes up category axis when changing range

    Is there a way of stop aggregating or aggregate on a different basis than categoryAxis labels?

    Thanks.

     Raido

  2. T. Tsonev
    Admin
    T. Tsonev avatar
    2772 posts

    Posted 15 May 2013 Link to this post

    Hello,

    You can leave the base unit to "hours" (with step 1) and only skip some of the labels:
    categoryAxis: {
       field: "start_date_time",
       type: "date",
       baseUnit: "hours",
       baseUnitStep: 1,
       labels: { step: 12 }
    }


    I hope this helps.

    Greetings,
    Tsvetomir Tsonev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kendo UI is VS 2017 Ready
  4. Raido Valgeväli
    Raido Valgeväli avatar
    26 posts
    Member since:
    May 2008

    Posted 15 May 2013 Link to this post

    Thanks, Tsvetomir Tsonev

    This helped me a bit forward, but there are still several questions:
    The major gridlines follow the categories (not labels) and there seems to be no way to configure them (nor minor gridlines). They are probably generated 1-to-1 for date groups and minor gridlines are skipped?
    Based on:
    http://www.kendoui.com/forums/dataviz/chart/specify-the-step-between-major-gridlines-in-a-datetime-series.aspx

    As the datetime range is selectable by end-user I need to rely on auto-format of the Date axis, so it's not always hours and step 12/24.
    I can set maxDateGroups but that would affect all 3 together a) data points b) labels c) gridlines (+ticks if they are not directly bound to gridlines)
    I would suggest
    1) There could be a separate maxGroups for all these 3?
    2) Values of these maxGroups are calculated based on the canvas size (not constant 10)

    Thanks.

     Raido

  5. Answer
    T. Tsonev
    Admin
    T. Tsonev avatar
    2772 posts

    Posted 16 May 2013 Link to this post

    Hi,

    Indeed every category (date) will get a grid lines and a tick. Both can be disabled, but don't have a step setting.

    Linking the number of groups to the chart size makes perfect sense. This can be expressed through configuration:

    categoryAxis: {
        field: "start_date_time",
        baseUnit: "fit",
        maxDateGroups: $("#chart").width() / 10,
        labels: { step: 2, rotation: -90 },
        type: "date"
    }

    The chart will display as many 10px groups as possible and hide every second label. Rotating the labels also saves space.

    We'll consider separate "max count" option for the labels and grid lines / ticks. These can prove to be convenient.

     Regards,
    Tsvetomir Tsonev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  6. Michaël
    Michaël avatar
    44 posts
    Member since:
    Feb 2014

    Posted 02 Nov 2015 in reply to T. Tsonev Link to this post

    Hi,

    Is there any news about that? It's really annoying that type "date" automatically aggregates all the data points. I've found about using categoryAxes, but this is far from ideal and does not work when using crosshair (because the width of each label is different). Therefore we would really need to a separate "maxCount" option for labels!

  7. T. Tsonev
    Admin
    T. Tsonev avatar
    2772 posts

    Posted 05 Nov 2015 Link to this post

    Hello,

    This is definitely something we'd like to tackle in the near future. The date axis should be able to display different time scales regardless of aggregation settings.
    For the moment, using a secondary axis remains our suggestion.

    Thank you for your patience.

    Regards,
    T. Tsonev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  8. Terry
    Terry avatar
    9 posts
    Member since:
    Apr 2015

    Posted 28 Apr in reply to T. Tsonev Link to this post

    Hi,

    Is their any update on this? Im also facing an issue where I don't want the aggregation based on the baseUnit on the categoryAxis.

  9. T. Tsonev
    Admin
    T. Tsonev avatar
    2772 posts

    Posted 01 May Link to this post

    Hi,

    It should be sufficient to specify the axis type in this case:
    categoryAxis: {
        type: "category",
        ...
    }

    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!
     
  10. Jonathan
    Jonathan avatar
    2 posts
    Member since:
    Feb 2014

    Posted 12 May in reply to T. Tsonev Link to this post

    I'll add my voice to Terry's.

    Is there still no way to display the category axis in a different baseUnit than the series ?

  11. T. Tsonev
    Admin
    T. Tsonev avatar
    2772 posts

    Posted 17 May Link to this post

    Hi,

    No, not yet I'm afraid. The workaround for the moment is to use a separate label axis.

    Apologies for the caused inconvenience.

    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
Kendo UI is VS 2017 Ready