I have a chart with Date series. When I don't have a value, on the xaxis ploat a value 0. How can i do to remove when the value = 0?
1 Answer, 1 is accepted
0
Missing User
answered on 19 Apr 2013, 01:17 PM
Hi Paulo,
I assume when you say that you don't have a value, you mean that the property of the business object is nullable and returns null instead of a valid value such as 0.
In this case, you can hide each item that corresponds to an empty value after the chart has been data bound:
foreach (var item in this.RadChart.Series[0].Items)
{
item.Label.Visible = !item.Empty;
}
}
If you want to hide items that actually correspond to 0 rather than null, you should, naturally, set the labels' visibility depending on whether the item.YValue property is 0.
All the best,
Ivan N.
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.