Kendo React Chart - Datetime category

1 Answer 181 Views
Charts General Discussions
Esteban
Top achievements
Rank 1
Esteban asked on 15 Jul 2022, 09:27 PM | edited on 16 Jul 2022, 12:16 AM

Hi!

I'm currently using kendo react charts with typescript, but I have a problem with the category axis (date type), basically it skips data when the date it's only with a difference of a few milliseconds, when the difference is in seconds theres no any problem.

It should be displayed as follows:

But it shows as below:

This is part of the datetimes:

I use categoryField property from ChartSeriesItem to provide those dates. How can I approach that?

 

Thanks

 

1 Answer, 1 is accepted

Sort by
0
Filip
Telerik team
answered on 19 Jul 2022, 11:31 AM

Hello, Esteban,

Thank you for reaching out to us.

A possible solution would be to set baseUnit to fit or any other option that fits:

https://www.telerik.com/kendo-react-ui/components/charts/api/BaseUnit/


In case this does not resolve your issue, can you please provide a reproducible example so that I can inspect it further?

I hope this helps.

Regards, FilipProgress Telerik

The Premier Dev Conference is back! 

Coming to you live from Progress360 in-person or on your own time, DevReach for all. Register Today.


Esteban
Top achievements
Rank 1
commented on 04 Aug 2022, 07:49 PM

Hello Filip,

I tried changing the baseUnit however it didn't work as expected.

Here is the sample code:

https://stackblitz.com/edit/react-bg98ws?file=app%2Fmain.tsx 

Thank you very much for your help.

 

Best Regards,

Esteban

Filip
Telerik team
commented on 08 Aug 2022, 02:19 PM

Hi, Esteban,

Thank you for the provided code sample. I also tried setting the autoBaseUnitSteps  prop to milliseconds but it seems that the chart is rendered the same way.

I will consult with one of the component's developers and get back to you once I have a solution.

Regards,Filip

Esteban
Top achievements
Rank 1
commented on 19 Aug 2022, 03:38 PM

Hi Filip,

Any good news about this?

I appreciate your help.

Kind Regards,

Esteban

Filip
Telerik team
commented on 23 Aug 2022, 08:09 AM

Hi, Esteban,

Apologies for the late reply.

I consulted with the developer responsible for the Chart component it seems that the rendered data does not skip but it gets aggregated instead, which is the expected behavior, and currently, there is no workaround for it.

If it helps your scenario it is possible to choose an aggregation function, more information can be found in the API:

https://www.telerik.com/kendo-react-ui/components/charts/api/ChartSeriesItemProps/#toc-aggregate/

I hope this helps.

Regards,FilipProgress Telerik

Tags
Charts General Discussions
Asked by
Esteban
Top achievements
Rank 1
Answers by
Filip
Telerik team
Share this question
or