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
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.
Tsvetomir Tsonev
the Telerik team
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
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.
Regards,
Tsvetomir Tsonev
the Telerik team
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!
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
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.
It should be sufficient to specify the axis type in this case:
categoryAxis: {
type: "category",
...
}
I hope this helps.
Regards,
T. Tsonev
Telerik
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 ?
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