I need to generate graphs on the fly and only when I receive the response will I know what type of graph to generate.
I have been trying for about a hour and cannot figure it out. What am I doing wrong? The legend shows the title, but it does not show the legend label that has been associated with each datapoint. Why?
What am I missing?
I have been trying for about a hour and cannot figure it out. What am I doing wrong? The legend shows the title, but it does not show the legend label that has been associated with each datapoint. Why?
What am I missing?
var chartArea = new ChartArea(); chartArea.LegendName = "test"; var pieSeries = new DataSeries { Definition = new PieSeriesDefinition { InteractivitySettings = {HoverScope = InteractivityScope.None, SelectionScope = InteractivityScope.Item, SelectionMode = ChartSelectionMode.Single } } }; pieSeries.Definition.ItemLabelFormat = "p";pieSeries.Add( new DataPoint() { YValue = 0.215208267, LegendLabel = "Toyota" } );pieSeries.Add( new DataPoint() { YValue = 0.192960612, LegendLabel = "General Motors" } );pieSeries.Add( new DataPoint() { YValue = 0.151830229, LegendLabel = "Volkswagen" } );pieSeries.Add( new DataPoint() { YValue = 0.125964366, LegendLabel = "Ford" } );pieSeries.Add( new DataPoint() { YValue = 0.091152353, LegendLabel = "Honda" } );pieSeries.Add( new DataPoint() { YValue = 0.079093251, LegendLabel = "Nissan" } );pieSeries.Add( new DataPoint() { YValue = 0.079093251, LegendLabel = "PSA" } );pieSeries.Add( new DataPoint() { YValue = 0.064697675, LegendLabel = "Hyundai" } ); chartArea.DataSeries.Add(pieSeries);RadChart1.DefaultView.ChartLegend.UseAutoGeneratedItems = true;RadChart1.DefaultView.ChartArea = chartArea;RadChart1.DefaultView.ChartLegend.Header = "Legend test";