以%设置标签格式 [英] To set the label format in %
问题描述
大家好,
我正在使用MS图表控件.在此,我只想将标签设置为数据点,例如"72%"的格式.我尝试下面的代码行,但它起作用了
无法为我工作
Hello all,
I am using MS-chart control. In that I just want to set the label to the data point in format like "72%". I try the the code line below but it dose
not work fro me
Chart1.Series(1).Points(sp).LabelFormat = "{0.0%}"
除此以外,还有其他人吗,因为标签出现在
上
图表为"72",仅不显示%"符号.如有任何想法,请帮助我.
感谢您所有的即时响应.我只是尝试了以下所有解决方案,但仍然对我不起作用.它没有遇到任何错误,但是也没有给我显示任何%" ...... ..
:doh:
谢谢&问候
Yogesh
Is anybody having anything else than that, Because the label appear on
chart is "72" only no "%" sign appear.Help me if you have any idea.
Thanks to all of u for your instant response.I just tried all of th following solution but still it dose not work for me.It dose not encounter any error but also it dose not show me any "%"........
:doh:
Thanks & Regards
Yogesh
推荐答案
我刚刚尝试过,下面的代码对我有用:
Hi,
I''ve just tried it and the following code works for me:
Chart1.Series[1].LabelFormat = "{0.#%}";
您需要将%"移至格式参数说明符"{0.0}%
"之外
You need to move "%" outside format parameter specifier: "{0.0}%
".
我不确定,但是只要将format设置为"0,#%"
,我就已经做了此操作.
或通过其他方式引用此 [这 [^ ],这样您可能会有什么想法.
I am not sure on that but Just try by putting format as"0,#%"
, I''ve done this operation quite before.
Or other way you could refer THIS[^] or THIS[^] so that you may have some what idea.
这篇关于以%设置标签格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!