.Net 图表控件 - 更改标签格式/值

发布于 2024-09-26 12:10:24 字数 282 浏览 0 评论 0原文

我正在尝试使用 ASP.Net 图表控件制作饼图。一切都很好。 X 值是特定项目的名称,Y 值是金额。图例显示的是 X 值,饼图切片的大小对应于 Y 值。一切都很好。

不过,我也将值作为标签附加到图表上,我希望它显示 Y 值。我该怎么做?我尝试过以下方法:

 series.AxisLabel = "#VALY";
 series.LabelFormat = "#VALY";
 series.Label = "#VALY";

有什么建议吗?

谢谢!

I am attempting to have a Pie chart using the ASP.Net Charting controls. Everything's fine. The X value is the name of a specific item with the Y value the amount. The Legend is displaying the X value, the size of the slices of the pie are correspond to the Y value. All is well.

However I also have the value, as a label, attached to the chart and I would like it to display the Y value instead. How can I do this? I have tried the following:

 series.AxisLabel = "#VALY";
 series.LabelFormat = "#VALY";
 series.Label = "#VALY";

Any advice?

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

吐个泡泡 2024-10-03 12:10:24

这应该可以解决您的问题。 “用例”1 和 2 可能对此有所帮助。

http ://blogs.msdn.com/b/alexgor/archive/2008/11/11/microsoft-chart-control-how-to-using-keywords.aspx

This should have a solution for your issue. 'Use case' 1 and 2 may assist with this.

http://blogs.msdn.com/b/alexgor/archive/2008/11/11/microsoft-chart-control-how-to-using-keywords.aspx

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文