Hi,
We are using Date axis line chart.We need to display a year data in the x-axis(dates), when we set baseUnit= "days", the labels are getting overlapped. So we have tried changing it to Fit, the kendo script automatically calculates average, there is no overlap in this case,but the points that are getting displayed is not matching the exact data.
Pls refer the attached snapshot, my data does not have any value for date 9/20/2015. Can it be made to show the points only for which the data is available. Or please suggest how can we handle the cases when the data is more than 100.
9 Answers, 1 is accepted
You can use categoryAxis.labels.step to reduce the number of labels rendered.
In order to control how the chart handles missing values, please refer to the missingValues option.
Here is a dojo with both configurations applied: http://dojo.telerik.com/@yordanov/ONawE
Regards,
Vasil Yordanov
Telerik
Hi,
We have tried categoryAxis.labels.step ,its working fine with small data but for huge data tooltip is overlapping.Attached the screen shot for your reference.
Thanks
Elango
This outcome is expected - there are too many data points and tooltip will be rendered for each point. Could you please elaborate a bit more what the expected outcome is?
On a side note, from the provided picture it appears that kendo.common.css and kendo.[theme].css are not included - therefore the tooltip is shrank. For more detailed information on this subject check the corresponding documentation.
Regards,
Iliana Nikolova
Telerik
I tried to reproduce this outcome but to no avail. Could you please check this dojo and let me know what I am missing?
Regards,
Iliana Nikolova
Telerik
Hi Iliana,
I looked at the dojo and it looked good, but your data starts toward the end of the month. If the first date is January 1st, 2015 and the date step is 30, the first date displayed on the axis is 01/2015 (for 1/1/2015), the second date would be 01/2015 (for 1/31/2015) and the third would be 03/2015 (for 3/2/2015 thirty days later completely skipping the 28 days in February). I modified the date values - attached is a screen shot.
In another case, if we were starting with Oct 1st, the first date would be 10/year, the second would be 10/year and the third would be 11/year. while the labels are accurate, the labels appear at the end of the month/span instead of the beginning.
Thank you for the provided details. I modified the data and believe this outcome is expected when labels step 30 is used. If you wish to display February you could change the step to 31 (updated dojo).
Regards,
Iliana Nikolova
Telerik
Hi!
How format categoryAxis.labels for PHP widgets?
Hi Dimo,
The labels for the category axis of the Kendo UI LineChart for PHP can be modified as follows:
$labels = new \Kendo\Dataviz\UI\ChartCategoryAxisItemLabels();
$labels->format("MM yyyy");
$categoryAxis = new \Kendo\Dataviz\UI\ChartCategoryAxisItem();
$categoryAxis->type('date')
->labels($labels)
->baseUnit("weeks");
Kind regards,
Tsvetomir
Progress Telerik
Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive, special prizes, and more, for FREE?! Register now for DevReach 2.0(20).