Hi, My chart is a 2D Line chart which has X axis configured to display Date only to assure label always visible with an interval of 1 day at different scrolling position with or without zooming.
My dataset contains only 2 columns which is date/time column, and data value.
Here is the current setting on my chart
UltraChart_Concentrate.LineChart.TreatDateTimeAsString = False
UltraChart_Concentrate.LineChart.DrawStyle = LineDrawStyle.Dash
UltraChart_Concentrate.Axis.X.TickmarkStyle = DataInterval
UltraChart_Concentrate.Axis.X.TickmarkInterval = 1
For each data point displaying on a chart it is a value for a specific date and time data on X axis.
I would like to display the tool tip label or something else that contains X and Y value of each data point when the mouse is hovering over the data point on my chart. By doing this, I do not have to display both date and time for each data point on X axis but only the 1 day interval with multiple data points on Y axis.
Thanks a lot
Hello Linh,
You can set this using the UltraChart's Tooltips' FormatString property. All you have to do is chosee which one of the format strings to use. Here is a link form our online documentation with the available strings: http://help.infragistics.com/NetAdvantage/WinForms/2010.1/CLR2.0/?page=Chart_Label_Formatting.html
And here is a sample code snippet:
ultraChart1.Tooltips.FormatString =
"<ITEM_LABEL> (@_@) <DATA_VALUE:00.##>";
Please let me know if you require any further assistance on the matter.
Sincerely,
Petar Monov
Developer Support Engineer
Infragistics Bulgaria
www.infragistics.com/support
Hi Petar,
The format string "<ITEM_LABEL> (@_@) <DATA_VALUE:00.##>" does not provide the data I need.
I need to be able to display the X value for every Y value on the chart. The X value is the Date/Time data value from my dataset.
Could you provide me the exact syntax for displaying X value for tooltips.
Thanks
I am really glad I could help you out.
If you could only verify this thread as answered, so that other user may take greater advantage of it, that would be great.
Thanks in advance.
Kind regards Petar,
Petar,
It works realy well.
Thanks for your excellent support
I had a closer look at your issue and do see what you mean. Usually for a line chart a string and numeric columns are required. In your scenario since there is no label column the UltraChart maps the DateTime values as series separators of sort. This means you can use the <SERIES_LABEL> format string tag in your tooltip, but keep in mind that this actually the string representations you are using. I have created a sample project (Chart_Tooltips.zip) showing how you can use the ILableRenderer interface to format tooltips and labels and achieve your goal.
Hope this is what you needed. Please let me know if you require any further assistance.
Regards Petar.