txcwboy Posted November 16, 2011 Report Posted November 16, 2011 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. Quote
AndreG Posted November 18, 2011 Report Posted November 18, 2011 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(); } } Quote
txcwboy Posted November 21, 2011 Author Report Posted November 21, 2011 Thanks for the advice. I will try this out, let you know and mark your post accordingly (if it was the answer). Quote
Recommended Posts
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.