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

Skip Plotted graph for mssing data

1 Answer 46 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Pradyumna asked on 25 Oct 2010, 07:59 PM

I would like to know if there is any way to skip the plotting of graph for missing data. My x-axis is of shortdate and y-axis is numeric. The values on the x-axis range from 9/1 to 10/9. my step value on x-axis is 1 day so it plots 1 gridline for each point(1 day). Now, my dataset does not have any items with values for certain dates but it still gets plotted on the x-axis because of the min and max values given to x=axis. Is there any way to suppress the plotting of this x-axis label, if the data set doesn't contain the data? Also, the labels overlap. The date range is 9/5 - 10/9 Attaching chart for your ref.


1 Answer, 1 is accepted

Sort by
Telerik team
answered on 27 Oct 2010, 11:02 AM
Hi Pradyumna,

You can't restrict certain Chart values from appearing. What I suggest you is to use Empty Values feature ( of RadChart and set certain points of Line chart as Empty. You can find example of chart with Empty Values with source code in our demos -
You have complete control over the visual style of empty values. Set their Color to Transparent to make them invisible like this:
ChartSeries s1 = new ChartSeries("Series 1", ChartSeriesType.Line);
s1.Appearance.EmptyValue.Line.Color = System.Drawing.Color.Transparent;
Have in mind that you should set Yvalue for every XValue date to be able to use Empty Values feature.

You can get rid of label overlapping by rotating the Item Labels of XAxis 90 degrees for example.
Here is how you can achieve this:
<telerik:RadChart ID="RadChart1" runat="server"
                    <LabelAppearance RotationAngle="90"></LabelAppearance
Use an additional setting, which will improve the text quality for the rotated labels:
RadChart1.Appearance.TextQuality = Telerik.Charting.Styles.TextQuality.AntiAlias;

the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Chart (Obsolete)
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question