Jump to content
Software FX Community

Recommended Posts

Posted

I've got a bit of a problem and hopefully I can explain so that all will understand.  I have a crosstab chart that is displaying the celsius temperature over time per temperature probe.  What I want to be able to do is display not only the celsius temperature in the tooltip, but its fahrenheit equivalent.  Thereby negating having to create a duplicate of every one of my temperature charts just to show fahrenheit.  Is there anyway to reference a second data series (value) in a crosstab chart to pull the correlating fahrenheit temperature or a way to calculate the fahrenheit and have that displayed in the tooltip?  Thanks.

Posted

You can use the event GetTip to display any value on the tooltip. So you should make sure that the tooltip is just the value (since it is not by default in a crosstab) by setting it to %v:

 chart1.ToolTipFormat = "%v";

And then use the GetTip event to do the calculations:

  private void chart1_GetTip(object sender, GetTipEventArgs e) {   if (!e.Text.Equals("")) {   double tipValue = Convert.ToDouble(e.Text);   e.Text = "Value is: " + e.Text + "\r\nAnd 50% of that is: " + (tipValue * .5).ToString();   }   }

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