We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Chart ToolTip and DateTime

Thread ID:





90913 Oct 23,2009 06:02 PM UTC Oct 26,2009 10:05 AM UTC WinForms 2
Tags: Chart
Benoit Marsot
Asked On October 23, 2009 06:02 PM UTC

I have a problem with chart on windows essential studio
The chart is using DateTime on the primary X axis to represent market data, I am using tooltip in a candle chart to represent for each point:
- On the y axis: High, Low, Open, Close
- On the x axis: DateTime
I tried to used the PointsToToolTip property of the chart series:
this._cs.PointsToolTipFormat =
"{3} - O: {" +((int)YValueIndex.Open + 4).ToString()
+ "}, C: {" + ((int)YValueIndex.Close + 4).ToString()
+ "}, H: {" + ((int)YValueIndex.High + 4).ToString()
+ "}, L: {" + ((int)YValueIndex.Low + 4).ToString() + "}";
And It work fine except for the X axis (DateTime) that return me an integer instead of a date, for example with the format above:
40078 – O: 52.47, C: 45.8, H: 54.4, L: 45.55
(See the 40078 instead of the date)
I tried as well to set the Tooltip directly to the chartSeries.Styles property when I populate the points:
toolTipText = quote.DateTime.ToShortDateString()
+ " - O: " + quote.Open.ToString()
+ ", C: " + quote.Close.ToString()
+ ", H: " + quote.High.ToString()
+ ", L: " + quote.Low.ToString();
this._cs.Styles[this._cs.Points.Count - 1].ToolTip = toolTipText;
And tried the same using the ChartPrepareStyleInfoHandler event handler of the chart series with no success; in both cases I only have the first Y data (HighPrice or {4}) which is the default value for the ToolTip.

Could you help me?

Thanks in advance,

Benoit Marsot
Replied On October 23, 2009 06:20 PM UTC

Ok I finally figure out that you need to set the chart series property PointsToolTipFormat to "{2}" for the PrepareStyle callback method to be able to set the tooltip.


Venkata Vijayaraj B [Syncfusion]
Replied On October 26, 2009 10:05 AM UTC

Hi Benoit,

We are glad to hear that your problem has been resolved.

Please feel free to contact us if you have any other concerns.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon