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

Force Date axis not to aggregate values?

9 Answers 499 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Raido Valgeväli
Top achievements
Rank 2
Raido Valgeväli asked on 14 May 2013, 04:05 PM
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

9 Answers, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 15 May 2013, 07:16 AM
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!
0
Raido Valgeväli
Top achievements
Rank 2
answered on 15 May 2013, 08:47 AM
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

0
Accepted
T. Tsonev
Telerik team
answered on 16 May 2013, 01:42 PM
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!
0
Michaël
Top achievements
Rank 1
answered on 02 Nov 2015, 01:52 PM

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!

0
T. Tsonev
Telerik team
answered on 05 Nov 2015, 08:11 AM
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!
 
0
Terry
Top achievements
Rank 1
answered on 28 Apr 2016, 11:31 AM

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.

0
T. Tsonev
Telerik team
answered on 02 May 2016, 08:16 AM
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!
 
0
Jonathan
Top achievements
Rank 1
answered on 12 May 2016, 06:01 PM

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 ?

0
T. Tsonev
Telerik team
answered on 17 May 2016, 06:55 AM
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!
 
Tags
Charts
Asked by
Raido Valgeväli
Top achievements
Rank 2
Answers by
T. Tsonev
Telerik team
Raido Valgeväli
Top achievements
Rank 2
Michaël
Top achievements
Rank 1
Terry
Top achievements
Rank 1
Jonathan
Top achievements
Rank 1
Share this question
or