To reproduce:
public RadForm1()
{
InitializeComponent();
this.radChartView1.AreaType = ChartAreaType.Pie;
PieSeries series = new PieSeries();
series.DataPoints.Add(new PieDataPoint(50, "Germany"));
series.DataPoints.Add(new PieDataPoint(70, "United States"));
series.DataPoints.Add(new PieDataPoint(40, "France"));
series.DataPoints.Add(new PieDataPoint(25, "United Kingdom"));
series.ShowLabels = true;
this.radChartView1.Series.Add(series);
radChartView1.ShowLegend = true;
}
Random rnd = new Random();
private void radButton1_Click(object sender, EventArgs e)
{
this.radChartView1.Series[0].DataPoints.RemoveAt(0);
this.radChartView1.Series[0].DataPoints.Add(new PieDataPoint(rnd.Next(100), rnd.Next(100).ToString()));
}
Workaround:
private void radButton1_Click(object sender, EventArgs e)
{
this.radChartView1.Series[0].DataPoints.RemoveAt(0);
this.radChartView1.Series[0].DataPoints.Add(new PieDataPoint(50, rnd.Next(100).ToString()));
this.radChartView1.ChartElement.LegendElement.Items.Clear();
foreach (PieSeries series in radChartView1.Series)
{
for (int i = 0; i < series.DataPoints.Count; i++)
{
var dataPoint = series.DataPoints[i] as PieDataPoint;
var element = series.Children[i] as PiePointElement;
var legendItem = new LegendItem(element);
legendItem.Title = dataPoint.LegendTitle;
this.radChartView1.ChartElement.LegendElement.Items.Add(legendItem);
}
}
}