SeriesHotspot and AutoPostBack

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

SeriesHotspot and AutoPostBack

Post by norman » Fri Mar 20, 2009 3:15 pm

Hi,

I've added a SeriesHotspot tool to my web chart in order to customize the text displayed in the tooltip when you hover over the series points. I used the following to do this:

Code: Select all

Dim seriesHotspotTool As New Steema.TeeChart.Tools.SeriesHotspot(WebChart1.Chart)
With seriesHotspotTool
   .HelperScript = Steema.TeeChart.Tools.HotspotHelperScripts.Annotation
   .HotspotCanvasIndex = 499
   .MapAction = Steema.TeeChart.Styles.MapAction.Script
   .MapElements = ""
End With
AddHandler seriesHotspotTool.GetHTMLMap, AddressOf hotspot_GetHTMLMap
and

Code: Select all

Private Sub hotspot_GetHTMLMap(ByVal sender As Steema.TeeChart.Tools.SeriesHotspot, ByVal e As Steema.TeeChart.Tools.SeriesHotspotEventArgs)

   Dim XVal As String = e.PointPolygon.Title
   XVal = Date.FromOADate(e.Series.XValues.Value(e.PointPolygon.ValueIndex)).ToString("dd/MM/yyyy HH:mm:ss")

   e.PointPolygon.Title = "Date/Time: " & XVal & vbCrLf & _
   "Value: " & e.Series.YValues.Value(e.PointPolygon.ValueIndex).ToString()

End Sub
I also want to be able to respond to when a user clicks a point on the chart so I added the following whilst setting the charts AutoPostBack property to True.

Code: Select all

Private Sub WebChart1_ClickSeries(ByVal sender As Object, ByVal s As Steema.TeeChart.Styles.Series, ByVal valueIndex As Integer, ByVal e As System.EventArgs) Handles WebChart1.ClickSeries

   ' Do something

End Sub
The thing is though once I make these changes, whilst the ClickSeries works the tooltips no longer appear. It seems like its one or the other - is this true?

Procedurally I kind of got around it by having my chart in either one of two modes (i.e. View or Edit). When in View mode the tooltips are displayed whereas when in Edit mode the chart responds to user clicks, although I'd much prefer to be able to have both at the same time. Is this possible?

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 » Fri Mar 20, 2009 3:28 pm

Hi Norman,

Same issue is being discussed here. We will post a reply at that thread.

Thanks in advance.
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

Marc
Site Admin
Site Admin
Posts: 1266
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona
Contact:

Post by Marc » Fri Mar 20, 2009 5:43 pm

Hello Norman,

We're hoping to add functionality to support side-by-side Autopostback and Hotspot for the WebChart for the next maintenance release. There is a workaround currently available I believe (I'll need to test that to confirm), which is to add a Zoomtool to the Chart. There is no need to add any zoom processing methods. With the ZoomTool present a differing variant of the javascript clientside code is activated on the page permitting processing of Chart clicks.

Regards,
Marc
Steema Support

Post Reply