因为你设置了序列的Label为百分比的原因,所以扇形和图例上显示的都是百分比。在此句代码后面再设置一下图例项的文本就可以了:
chartpie.Series["Series1"].LegendText = "#VALX";
希望对你有帮助,还有疑问请追问或是Hi
是那个名字显示的绑定 换成相应的数据库字段可以实现的
string[] xValue = { "A", "B", "C", "D" };//设置标签
double[] yValue = { 30, 40, 50, 60 }; //获取要显示的值
chart.Legends[0].Enabled = false;
chart.BorderSkin.SkinStyle = BorderSkinStyle.Emboss; //设置图表边框为浮雕效果
chart.BorderlineDashStyle = ChartDashStyle.Solid; //设置图表边框为实线
chart.BorderlineWidth = 1; //设置图表边框的宽度
////chart.Series[0]["PieLabelStyle"] = "Outside";//将文字移到外侧
////chart.Series[0]["PieLineColor"] = "Black";//绘制黑色的连线。
chart.Series[0].ChartType = SeriesChartType.Pie; //设置图表类型为饼图
chart.Series[0].CustomProperties = "PieLabelStyle=Outside,PieLineColor=Black,DoughnutRadius=25, PieDrawingStyle=Concave, CollectedLabel=Other, MinimumRelative" + "PieSize=20"; //设置饼图的参数
//chart.Series[0].IsValueShownAsLabel = true;
chart.Series[0].Label = "#VALX:#PERCENT{P0}";//#VALX显示X轴信息,#PERCENT{P0}以百分比显示Y轴信息,{P0}保留0位小数点
chart.Series[0].Points.DataBindXY(xValue, yValue); //将数据绑定到图表