To reproduce:
- Add pie chart and drop down list with some items to a form.
- Then use the following code:
Private Sub RadForm1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim series As New PieSeries
series.DataPoints.Add(New PieDataPoint(50, "test"))
series.DataPoints.Add(New PieDataPoint(50, "test2"))
series.ShowLabels = True
RadChartView1.Series.Add(series)
TryCast(RadChartView1.Series(0).Children(0), PiePointElement).BackColor = Color.Red
TryCast(RadChartView1.Series(0).Children(1), PiePointElement).BackColor = Color.Blue
End Sub
Private Sub RadChartView1_LabelFormatting(sender As Object, e As ChartViewLabelFormattingEventArgs) Handles RadChartView1.LabelFormatting
e.LabelElement.Shape = New OfficeShape(True)
End Sub
Workaround:
e.LabelElement.SuspendPropertyNotifications()
e.LabelElement.Shape = New OfficeShape(True)
e.LabelElement.ResumePropertyNotifications()