How to: Conditionally Hide Series Labels
Handle the ChartControl.CustomDrawSeriesPoint event to conditionally hide series labels. In the event handler, change the CustomDrawSeriesPointEventArgs.LabelText property value to String.Empty to hide a label.
Note
Handling the Web
private void OnCustomDrawSeriesPoint(object sender, CustomDrawSeriesPointEventArgs e) {
if (e.SeriesPoint.Values[0] < 1) {
e.LabelText = String.Empty;
}
}
The following image demonstrates the result:
See Also