Page 1 of 1

SeriesHotspot and AutoPostBack

Posted: Fri Mar 20, 2009 3:15 pm
by 13048070
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

Posted: Fri Mar 20, 2009 3:28 pm
by narcis
Hi Norman,

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

Thanks in advance.

Posted: Fri Mar 20, 2009 5:43 pm
by Marc
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