当我生成telerik饼图时。我想将lable值与%data值连接起来,但我没有得到这两个值。我的代码 -
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();
我希望我的图表像E1007(40%)......
答案 0 :(得分:1)
objChartSeries.DataLabelsColumn = SomeDecimal.ToString("P");