Do you have any sample codes for for creating a pie chart with the value of each slice displayed (counter or %).
I have tried the codes below to create pie chart on-fly but couldn't get it done:
........
Dim
objChart As New Telerik.Reporting.Chart()
objChart.SeriesPalette =
"Palette1"
objChart.Style.Color = Color.DarkBlue
objChart.BitmapResolution = 96.0F
objChart.ImageFormat = System.Drawing.Imaging.ImageFormat.Emf
objChart.Name = strFieldName
objChart.ChartTitle.TextBlock.Text = objChartDetails.ChartTitle
objChart.ChartTitle.Appearance.FillStyle.MainColor = Color.Transparent
objChart.Size =
New Telerik.Reporting.Drawing.SizeU(New Telerik.Reporting.Drawing.Unit(drReport("Width"), Telerik.Reporting.Drawing.UnitType.Pixel), New Telerik.Reporting.Drawing.Unit(drReport("Height"), Telerik.Reporting.Drawing.UnitType.Pixel))
objChart.ChartTitle.Appearance.Dimensions.Margins =
New Telerik.Reporting.Charting.Styles.ChartMargins(0, 10, 10, 10)
objChart.PlotArea.EmptySeriesMessage.Appearance.Visible =
True
objChart.PlotArea.EmptySeriesMessage.Visible =
True
objChart.PlotArea.Appearance.FillStyle.MainColor = Color.White
objChart.PlotArea.Appearance.FillStyle.SecondColor = Color.White
Dim
objChartSeries As New ChartSeries()
objChartSeries.DefaultLabelValue =
"#%"
objChartSeries.Appearance.TextAppearance.Visible =
True
objChartSeries.Appearance.LegendDisplayMode = Telerik.Reporting.Charting.ChartSeriesLegendDisplayMode.ItemLabels
objChartSeries.DataLabelsColumn =
"StatName"
objChartSeries.Type = objChartDetails.ChartType
objChartSeries.DataYColumn =
"StatCount"
objChart.Series.Add(objChartSeries)
........
my data source is from a table with StatName (varchar) and StatCount(int)
StatName StatCount
Verified 23
No-Verified 65
Attached is a sample of my result.
Thanks
quan