Line chart line sloping between datapoints where there is no data.

1 Answer 56 Views
Charts
Stephanie
Top achievements
Rank 2
Iron
Stephanie asked on 16 Aug 2024, 06:15 PM

Using kendo line charts and with datapoints that contain a value and a date, if there is a gap between two dates then the line chart with slope up to the next point when there is no data to be displayed (please reference "slopedLine" picture). 

In the example "slopedLine" I have data ranging from 8/8/2024 from 10-11am then I have data from 9/8/2024 from 9:55-10am. I am looking for a way I can make this line to not slope and stay at 0 all the way from the end of 8/8/2024 to 9/8/2024. I have this same issue with larger data sets (please reference "timeRangeLarge"). In this second example I have 600 data points but we could have up to 10,000 points depending on filters and other factors.

In the example "noSlopAllDates", I removed the type="date" and set it to type="category" for kendo-chart-category-axis-item and that fixes the slope but then my labels are messed up and we can see EVERYONE and maxDivisions does not apply to type "category". 

Yanmario
Telerik team
commented on 21 Aug 2024, 10:15 AM

Hi Stephanie,

I would suggest exploring the series item missingValues property which has a gap option that would seem useful in this case. Example of all three options:

https://stackblitz.com/edit/angular-cm1zes?file=src%2Fapp%2Fapp.component.ts

If further assistance is needed, a runnable example with the current implementation and a screenshot of the desired end result would be also helpful for me to check it out and find possible solutions for your specific use case.

Regards,
Yanmario
Progress Telerik

Stephanie
Top achievements
Rank 2
Iron
commented on 21 Aug 2024, 03:20 PM

This is perfect thank you! Im not sure how I missed this property during setup

1 Answer, 1 is accepted

Sort by
0
Accepted
Stephanie
Top achievements
Rank 2
Iron
answered on 21 Aug 2024, 03:20 PM
Just to close out this question, Yanmario's comment solved the issue for me.
Tags
Charts
Asked by
Stephanie
Top achievements
Rank 2
Iron
Answers by
Stephanie
Top achievements
Rank 2
Iron
Share this question
or