4

当我生成 Telerik 饼图时。我想将标签值与 %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%) 这样的图表...

4

1 回答 1

1
objChartSeries.DataLabelsColumn = SomeDecimal.ToString("P");
于 2012-03-22T04:34:27.887 回答