Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
958
How to format date/time data in Tooltips and along X-axis?
posted

Hello,

I am currently working with the WinChart and I am trying to show quotes information in a line chart. The information itself is shown fine but now I want to change the contence of the Tooltips of the data points and the date/time information which is shown below the X-axis.

The chart is bound to an IBindingList derived class. The objects in this class hold only two values: a price information and a date/time information.
I am able to show the price information in the desired format but I have no idea how I can change the format of the date/time information and I am not able to show the date/time in the Tooltips.

My Tooltips should look like this:

Date:
Price

i.e.

2008-07-10:
45.05

In my case the right FormatString for the desired data is like this <SERIES_LABEL><DATA_VALUE>. I extended that with the desired formats like that:

<SERIES_LABEL:yyyy-MM-dd>:\n<DATA_VALUE: #,##0.00>

but the Tooltip-contence is shown as below:

2008-07-10 00:00:00:
45.05

I don't want the time information to be displayed. Is there a trick to supress the time part or is it a bug in WinChart?

I have even more problems with the date/time data along the X-axis. I don't know where to format it. Can you please give me advise where to define the desired format?

Thanks in advance and best regards,

Gerald