Hello Telerik team,
I created a pie chart dynamically in the pie NeedDataSource function.
Unfortunatly the chart is duplicated at each row as you can see with the attached file.
Have you got an idea please ?
Thanks
I created a pie chart dynamically in the pie NeedDataSource function.
void chart1_NeedDataSource(object sender, EventArgs e){ List<Product> products = new List<Product>(); products.Add(new Product("Parka L", 120)); products.Add(new Product("Parka M", 100)); products.Add(new Product("Parka S", 132)); Telerik.Reporting.Processing.Chart procChart = (Telerik.Reporting.Processing.Chart)sender; Telerik.Reporting.Chart defChart = (Telerik.Reporting.Chart)procChart.ItemDefinition; defChart.IntelligentLabelsEnabled = false; ChartSeries serie = new ChartSeries(); serie.Type = ChartSeriesType.Pie; serie.Clear(); serie.Appearance.LegendDisplayMode = Telerik.Reporting.Charting.ChartSeriesLegendDisplayMode.ItemLabels; foreach (Product lst in products) { ChartSeriesItem item = new ChartSeriesItem(); item.YValue = (double)lst.QuantityInStock; item.Name = (string)lst.Name; item.Appearance.Exploded = true; item.Label.TextBlock.Text = (string)lst.Name + " - #%"; serie.Items.Add(item); } defChart.Series.Add(serie);}Unfortunatly the chart is duplicated at each row as you can see with the attached file.
Have you got an idea please ?
Thanks