gpt4 book ai didi

asp.net - 如何在 telerik 饼图中设置标签值及其百分比值

转载 作者:行者123 更新时间:2023-12-02 11:17:05 25 4
gpt4 key购买 nike

当我生成 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();

Pie chart screen shot我想要像 E1007(40%) 这样的图表...

最佳答案

objChartSeries.DataLabelsColumn = SomeDecimal.ToString("P");

关于asp.net - 如何在 telerik 饼图中设置标签值及其百分比值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5154739/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com