Jump to content
Software FX Community

how to format the ToolTips of the Pie Chart


Prabagarane

Recommended Posts

Hi all

according to my requirement ,i want to format the tooltips in the Piechart. for example. the tool tips show like 12000$, but i want to show like 1,200.00$. is it possibe to change some of the words and formating the numbers in the tooltip. if yes means , Please tell me the answers , its very very urgent for me...

Thanks in advace..

Praba

Link to comment
Share on other sites

Praba,

 You can give custom formats to your tooltip using the CustomFormat property of the ValueFormat class. More information about this property can be found on your Resource Center. Here is a little sample code that reproduces what you are looking for.

Chart1.RenderFormat = ".NET";

Chart1.Data.Series = 1;

Chart1.Data.Points = 10;

Random r = new Random();for (int i = 0; i < Chart1.Data.Series; i++)

{

for (int j = 0; j < Chart1.Data.Points; j++)

{

Chart1.Data[i, j] = r.Next(10000,100000)/100;

}

}

Chart1.Gallery =
Gallery.Pie;

Chart1.AxisY.DataFormat.Decimals = 2;

Chart1.AxisY.DataFormat.CustomFormat =

"#,#.00$";

 

Regards,

AndreG

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...