图表值格式 [英] Chart value formatting

查看:108
本文介绍了图表值格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在.NET 3.5框架中使用Chart控件.我设置了第二个Y轴,该轴显示了perperatge值.我按照下面的代码
在我的源代码文件中:

I am using Chart control in .NET 3.5 framework. I set my secondary Y-Axis which shows percenatge value. I follow the code below
in my source code file:

;Set the lable format as % for secoudry Y axis
chart.ChartAreas(strChartArea).AxisY2.LabelStyle.Format = "P0"


输出中Y轴上的标签的显示格式为10,000%作为轴上的最大值,但我必须将其设置为100%作为轴上的最大值/


Labels on Y-Axis in output is having a dispaly format of 10,000% as max value on axis but i have to set it for 100% as max value on axis/

How can i do this?

推荐答案

我刚刚得到了答案.
I just got the answer.
chart.ChartAreas(strChartArea).AxisY2.LabelStyle.Format = "{0:0}%"


:)


这篇关于图表值格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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