SeriesHotspot and AutoPostBack
Posted: 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:
and
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.
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
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
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
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
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