I have been struggling to find a way to hide the labels on each point mark in a dataseries on a chart. I'm working in VB and Silverlight 4. Here is basically what I'm trying to do...
Dim dataSeries as new DataSeries
For Each thisObject as Object in items
dim dataPoint as new DataPoint
dataPoint.YValue += thisObject.Tag
It seems pretty simple, but I cannot figure out how to hide the labels on each of the dataPoints. I followed some of the other forums on here and tried things like:
radChart.DefaultView.ChartArea.SmartLabelsEnabled = False
radChart.DefaultSeriesDefinition.ShowItemLabels = False
dataPoint.Label = Nothing
dataPoint.LabelFormat = Nothing
Nothing seems to work to hide those labels. I saw in the documentation stuff about using Series and ChartSeries, but I don't seem to have either of those in my version of Telerik controls.
Thanks in advance!
5 Answers, 1 is accepted
Here is how you can turn off the Visibility for the Series Items Labels:
the Telerik team
Ah, thank you!
I am having a similar problem but I am trying to control this programitically with a button. It does not seem to do anything but seems like it should be simple.
private void showLabelsBtn_Click(object sender, RoutedEventArgs e)
Here's the way I did it in VB, if it helps at all. The ShowItemLabel property to set is the one on the defined Series Definition.
Dim lineSeriesDefinition As New LineSeriesDefinition
Dim dataSeries As New DataSeries
.Definition = lineSeriesDefinition
.LegendLabel = "Series 1"
'Add data points to data series
'Add data series to chart
Have in mind that the DefaultSeriesDefinition of the RadChart is Bar which means that if your Serie is of another type (Line for example) the code you are using to turn on/off visibility of the SeriesItemLabels won't affect it.
Here is what I'm suggesting instead (this will affect the first serie set in your code no matter of it's Chart Type):
the Telerik team