Click here to Skip to main content
15,887,477 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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%}"


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
Posted
Updated 17-Feb-20 10:10am
v3

Hi,

I've just tried it and the following code works for me:
C#
Chart1.Series[1].LabelFormat = "{0.#%}";
 
Share this answer
 
You need to move "%" outside format parameter specifier: "{0.0}%".
 
Share this answer
 
v2
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.
 
Share this answer
 
Try
Chart1.Series(1).Points(sp).LabelFormat = "{0.#%}"
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900