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. Image for the cookie policy date
close icon

Chart ToolTip and DateTime

Hi,
I have a problem with chart on windows essential studio 5.2.0.25.
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.Points.Add(point);
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

2 Replies

BM Benoit Marsot October 23, 2009 06:01 PM UTC

Sorry I am in asp.net and this is a window chart issue, I'll repost-it to windows chart


VV Venkata Vijayaraj B Syncfusion Team October 26, 2009 10:03 AM UTC

Hi Benoit,

Thanks for posted this issue in Windows forms.

Regards,
Venkat.


Loader.
Live Chat Icon For mobile
Up arrow icon