How to set lable value with their% value in telerik Pie chart

When I create a telerik pie chart. I want to combine the lable value with the% data value, but I do not get both values ​​.my code is

ChartSeries objChartSeries = new ChartSeries("Pie"); objChartSeries.Type = ChartSeriesType.Pie; objChartSeries.Appearance.LegendDisplayMode = ChartSeriesLegendDisplayMode.ItemLabels; objChartSeries.Appearance.LabelAppearance.Visible = true; objChartSeries.Appearance.ShowLabelConnectors = true; objChartSeries.Appearance.ShowLabels = true; objChartSeries.Appearance.DiameterScale = 0.6; objChartSeries.DataLabelsColumn = Xtext + "#Y"; //objChartSeries.DefaultLabelValue = "#Y"; //RadChart1.Legend.TextBlock.Text = ddlX.SelectedItem.Text.Trim(); //RadChart1.Legend.Visible = true; RadChart1.Series.RemoveSeries(); RadChart1.Series.Add(objChartSeriesBlank); RadChart1.Series.Add(objChartSeries); RadChart1.Series[1].DataYColumn = Yval; RadChart1.DataSource = dsResult; RadChart1.DataBind(); 

Pie chart screen shot I need my chart as E1007 (40%) ...

+4
source share
1 answer
 objChartSeries.DataLabelsColumn = SomeDecimal.ToString("P"); 
+1
source

Source: https://habr.com/ru/post/1341806/


All Articles