在饼图中显示YValue而不是XValues [英] Display YValue instead of XValues in Pie chart

查看:242
本文介绍了在饼图中显示YValue而不是XValues的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个饼图,我在后面的代码中设置了这些属性:

I have a pie chart and I set these properties in code behind:

...


string[] xValues = { "x1", "x2", "x3"};

int[] yValues = { val1,val2,val3 };

Chart1.Series[0].Points.DataBindXY(xValues, yValues);

Chart1.Series[0].Points[0]["Exploded"] = "true";


推荐答案

你好,

设置 Chart1.Series [0] .IsValueShownAsLabel = true; 将在饼图切片上显示y值。

Setting Chart1.Series[0].IsValueShownAsLabel = true; will show the yValues on the pie slices.

如果您希望显示的是&ybsp; yValues图表  图例,设置  Chart1.Series [0] .LegendText =" #VALY" ;;

If you wanted the yValues displayed on the chart legend, set Chart1.Series[0].LegendText = "#VALY";


这篇关于在饼图中显示YValue而不是XValues的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆