Jump to content
Software FX Community

How to show decimal point in tooltips?


dolgorae

Recommended Posts

  • 3 weeks later...

Hi, 

If you want to show the original double type value (without specifying a fixed number of decimals), you can use the GetTip Event to create a custom tooltip. Take a look at the following sample:private void chart1_GetTip(object sender, GetTipEventArgs e){ if (e.HitType == HitType.Point)  {   e.Text = chart1.Data[0, e.Point].ToString(); }}

Alternatively, you can use the DataFormat property to specify the number of decimals:

chart1.AxisY.DataFormat.Decimals = 2;

Note: Using the DataFormat property will also specify the number of decimals for the pointlabels.

Hope this helps,

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...