Hallo,
I am trying to display multiple series in one Pie-Chart with the following VB-code:
In the result, i have a number of charts, which are equal to the "dataset.Count - 1" value. but all values should be displayed in one chart like the second chart in the following example: Example
I am trying to display multiple series in one Pie-Chart with the following VB-code:
Dim
chartSeries
As
ChartSeries
Dim
dataset
As
GeschlechterverhaeltnisDataTable = GetMyData()
Me
.pie_Chart.Chart.Series.RemoveSeries()
Me
.pie_Chart.PlotArea.XAxis.Appearance.TextAppearance.TextProperties.Font =
New
Font(
"Arial"
, 10)
Me
.pie_Chart.PlotArea.XAxis.Appearance.TextAppearance.TextProperties.Color = Color.Black
Me
.pie_Chart.PlotArea.XAxis.AutoScale =
False
Me
.pie_Chart.Legend.TextBlock.Appearance.TextProperties.Color = Color.LightSkyBlue
Me
.pie_Chart.Legend.Appearance.Position.AlignedPosition = AlignedPositions.Right
For
i
As
Integer
= 0
To
dataset.Count - 1
chartSeries =
New
ChartSeries(dataset(i).Column1.ToString(), ChartSeriesType.Pie)
chartSeries.AddItem(
New
ChartSeriesItem(dataset(i).count_result, dataset(i).count_result))
Me
.pie_Chart.Series.Add(chartSeries)
Next
Me.Chart_GenderRate.AddChartSerie
s(chartSeries)