setting the chart x-axis with date but skipping items that i don't hav

1 Answer 124 Views
Charts
SangHyun
Top achievements
Rank 1
SangHyun asked on 15 May 2023, 02:17 AM

Hi, im a new to this filed, kindly bare my knowledge.

At my work, I am drawing the line chart with x-axis as a date. 
But I would like to skip the labels that i do not have. 
Is there a way? If so, would you kindly share the docs or samples that can help me?

<Current - there is a range of date between two peaks in x axis>

<What I want - created by Excel with random number where there is no range of date between two peaks in x axis. only have x-axis that i have in my data>

1 Answer, 1 is accepted

Sort by
1
Accepted
Vessy
Telerik team
answered on 17 May 2023, 05:43 AM | edited on 18 May 2023, 04:16 AM

Hello, SangHyun,

There are two possible solutions for the described scenario that I can suggest you. The first one is to load the passed dates as categories, so only the labels associated to the available values will be shown:

The other option is to implement a custom labels `content` logic in a date axis, checking if the current axis label is part of the bound date labels:

Regards,
Vessy
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources!

SangHyun
Top achievements
Rank 1
commented on 18 May 2023, 02:20 AM | edited

Dear Vessy,

Aprreciated for replying to the question :)
I will try it as your suggestions.

By the way, the first link that you shared cannot be accessed. 
If possible, would you kindly tell me what is it?
Moreover, does that link should be entered with the licensed account that my company has?


Hope you a restful day.

Best Regards.

Vessy
Telerik team
commented on 18 May 2023, 04:18 AM

Hi, SangHyun,

I am sorry for the link - it seems I copied only part of it hence it appeared broken. The linked sample is in Stackblitz, so you can access it without any Telerik license:

Tags
Charts
Asked by
SangHyun
Top achievements
Rank 1
Answers by
Vessy
Telerik team
Share this question
or