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

kendo-chart-series ignore weekends

1 Answer 71 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Alomgir
Top achievements
Rank 1
Alomgir asked on 08 Jul 2020, 02:38 PM

Hello,

I am trying to do some time series analysis with Intraday, 1M, 3M, 6M and so on. Category field used is a date. I have no data for saturday and sunday. I know I can use [missingValues "gap" | "interpolate" | "zero"] to fill in for weekend. But I would like the chart points to be equally spaced with weekends not even showing up in the category axis. Is there a way to achieve this?

 

Thank You.

1 Answer, 1 is accepted

Sort by
0
Svet
Telerik team
answered on 10 Jul 2020, 08:44 AM

Hi Alomgir,

Thank you for the provided details.

Indeed, when the category axis is bound to an array of Date objects then the points for each category will be created automatically by the Chart. Thus even if there are no Dates added for the weekends a point for them will be created. What could be done in order to avoid that behavior is to pass a string array (instead of an array of Dates) to the Category axis. Such approach will require the developer to have all desired dates added to an array as strings and then pass them to the Category axis. That way points for the weekends won't be created. Here is an example demonstrating such approach:

https://stackblitz.com/edit/angular-nr4e6m?file=app/app.component.ts

Indeed, that approach won't benefit from the provided built-in features of a Chart which category axis is bound to Dates but currently there isn't another option that could be overtaken in order to avoid rendering points for specific Dates.

Please let us know in case any further information or assistance is required for this case. Thank you.

Regards,
Svetlin
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
General Discussions
Asked by
Alomgir
Top achievements
Rank 1
Answers by
Svet
Telerik team
Share this question
or