DateTimeCategoricalAxis with null values

1 Answer 88 Views
ChartView
Bob
Top achievements
Rank 1
Bob asked on 16 Sep 2022, 12:08 PM

Creating a RadChartView, both with a single series and multiple series for a DateTimeCategorical axis.  Some series have gaps (null values). I'd like the series to close up this gap in the line, connecting the two data points. I cannot find an option to do so. See the datagap.png and datagap2.png attachments for an example.

Some workarounds I've tried is to not add a data point at all for that date when the value is null, but then then that date doesn't show up in the category. See datagap3.png for an example.

Is there a setting to close this gap in the line, or am I using the wrong chart or series type?

 

 

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 21 Sep 2022, 05:09 AM
Hello, Robert, 

RadChartView supports empty values in the series. The empty X value is skipped from drawing: https://docs.telerik.com/devtools/winforms/controls/chartview/null-values-support- 

If you want the chart to behave as if the null value is not there, the possible solution that I can suggest is just to remove the empty value from the data collection you are using for populating the data.

Alternatively, you can consider using RadSparkline: https://docs.telerik.com/devtools/winforms/controls/sparkline/overview 
The EmptyPointBehavior property controls what happens with null points. The possible values are:
- ShowAsBlank: The null points would not be painted on the chart and a blank spot will appear.
- ShowAsZero: The null point will be considered as 0 on the Y axis.
- DoNotShow: The null point would not be painted on the chart.
More information is available in the following help article: https://docs.telerik.com/devtools/winforms/controls/sparkline/features/null-values 

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Principal
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
ChartView
Asked by
Bob
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or