We would like to plot a series and have each point clickable on the chart. It would be best if the series item was a circle or square (anything that can be clicked easily).
Once the item is clicked, an event will be fired. We would also like the mouse pointer to change to a hand (as happens when you hover over a link) when the series item can be clicked.
Do you have any examples of this?
Also, how can I download the latest VBDemo for ActiveCharts?
I think its for v8?
Regards
Paligap
Series Items as Links/Buttons
Hi Paligap,
you could use similar code to the following one :We would like to plot a series and have each point clickable on the chart. It would be best if the series item was a circle or square (anything that can be clicked easily).
Code: Select all
Dim xx As Integer
Private Sub Form_Load()
With TChart1
.Aspect.View3D = False
.AddSeries scPoint
.Series(0).FillSampleValues
.Series(0).Cursor = -21
End With
xx = 1
End Sub
Private Sub TChart1_OnMouseLeaveSeries(ByVal SeriesIndex As Long)
TChart1.Repaint
xx = 1
End Sub
Private Sub TChart1_OnSeriesClickPointer(ByVal SeriesIndex As Long, ByVal ValueIndex As Long, ByVal x As Long, ByVal Y As Long)
If xx = 1 Then
xx = 0
If TChart1.Series(0).Clicked(x, Y) <> -1 Then
TChart1.Series(0).asPoint.Pointer.DrawPointer TChart1.Canvas.HandleDC, False, _
TChart1.Series(0).CalcXPos(ValueIndex), _
TChart1.Series(0).CalcYPos(ValueIndex), _
TChart1.Series(0).asPoint.Pointer.HorizontalSize + 5, _
TChart1.Series(0).asPoint.Pointer.VerticalSize + 5, _
TChart1.Series(0).Color, _
TChart1.Series(0).asPoint.Pointer.Style
End If
End If
End Sub
I'm not sure what you refer with ActiveCharts, could you please be more specific ?Also, how can I download the latest VBDemo for ActiveCharts?
Pep Jorge
http://support.steema.com
http://support.steema.com