Adding ToolTips to series

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
norman
Newbie
Newbie
Posts: 82
Joined: Fri Jan 25, 2008 12:00 am

Adding ToolTips to series

Post by norman » Tue Feb 12, 2008 9:41 am

Hi,

Please could someone explain how to add ToolTips (on a mouse over) to a line series (i.e. steema.teechart.styles.line). I've had a look at the help guide, demos as well as the tutorial (no. 18) but I can't get it to work. I'm using v3 in a webform and the tempchart property is set to file. So far I have the following (it's been simplified for the sake of brevity) and it works ok:

Code: Select all

Dim timeSeries As New Steema.TeeChart.Styles.Line
With timeSeries
   .Color = Color.Blue
   With .Pointer
      .Style = Steema.TeeChart.Styles.PointerStyles.Circle
      .HorizSize = 2
      .VertSize = 2
      .Visible = True
   End With
   .Title = "My Series"
   .XValues.DateTime = True
End With

Dim timeSeriesAxis As New Steema.TeeChart.Axis
With timeSeriesAxis
   .AxisPen.Color = Color.Blue
   .StartPosition = 0
   .EndPosition = 100
   .Horizontal = False
   .OtherSide = False
   With .Title
      .Angle = 90
      .Caption = "My Series"
      .Font.Color = Color.Blue
   End With
   .Ticks.Color = Color.Blue
End With

' Add series
WebChart.Chart.Series.Add(timeSeries)

' Add custom axis
WebChart.Chart.Axes.Custom.Add(timeSeriesAxis)

' Specify custom vertical axis for series
timeSeries.CustomVertAxis = timeSeriesAxis

' Add points to series
While MyDataSource.MoveNext
   timeSeries.Add(x, y) 'x = date, y = double
End While
What do I have to add to the above to get ToolTips to show.

Thanks,

Norman

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Feb 12, 2008 10:17 am

Hi Norman,

You should use SeriesHotspot tool as shown at the List of Features\Interacting with Charts\Mouseover Hints examples in the live ASP.NET demo. Also notice that full demo project is included with TeeChart's installation.

Hope this helps!
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

norman
Newbie
Newbie
Posts: 82
Joined: Fri Jan 25, 2008 12:00 am

Adding ToolTips to series (cont)

Post by norman » Tue Feb 12, 2008 11:08 am

Hi,

I tried to follow that example to no avail (before posting my initial post). Could you indicate how to use SeriesHotspot in the context of the code I supplied previously? Please note I'm using VB.NET.

Thanks,

Norman

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Feb 12, 2008 11:12 am

Hi Norman,

You could just add the tool at design-time, right-clicking on the webchart, selecting "edit" and go to the "tools" tab.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

norman
Newbie
Newbie
Posts: 82
Joined: Fri Jan 25, 2008 12:00 am

Post by norman » Tue Feb 12, 2008 2:25 pm

Hi Narcís,

Thanks for your help. I got it to work by adding it at design time as you instructed. Is it possible to customise what is displayed in the tooltip? When the style is set to 'X and Y' I'd like to format the date and time so the date and time will always appear in dd/mm/yyyy hh:mm:ss format irrespective of the time frame I'm viewing.

Thanks for your continued assistance,

Norman

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Feb 12, 2008 2:36 pm

Hi Norman,

Yes, you can use the GetHTMLMap event as in the Modify Standard Mark Text example in the demo's section I pointed you before.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply