
Index
From: Christopher Ireland
Subject: Re: Slider
Date: Tue, 18 May 2004 11:44:35 +0200
Newsgroup: steema.public.teechart6.activex
Hi Roman,
> How can I become the Value from 30.04.2004 13:08:00???
Try:
Dim AMin, AMax
Private Sub Form_Load()
With TChart1
.Aspect.View3D = False
.AddSeries scLine
.Series(0).AddXY DateValue("30/04/2004") + TimeValue("13:00:00"), 10,
"", clTeeColor
.Series(0).AddXY DateValue("30/04/2004") + TimeValue("13:10:00"), 20,
"", clTeeColor
.Series(0).AddXY DateValue("30/04/2004") + TimeValue("13:20:00"), 30,
"", clTeeColor
.Series(0).XValues.DateTime = True
.Environment.InternalRepaint
AMin = .Series(0).CalcYPosValue(.Axis.Left.Minimum)
AMax = .Series(0).CalcYPosValue(.Axis.Left.Maximum)
.Tools.Add tcAnnotate
.Tools.Items(0).asAnnotation.Shape.CustomPosition = True
.Tools.Items(0).Active = False
.Tools.Add tcCursor
.Tools.Items(1).asTeeCursor.Series = .Series(0)
.Tools.Items(1).asTeeCursor.Style = cssVertical
.Tools.Items(1).asTeeCursor.FollowMouse = True
End With
End Sub
Private Sub TChart1_OnCursorToolChange(ByVal Tool As Long, ByVal X As Long,
ByVal Y As Long, ByVal XVal As Double, ByVal YVal As Double, ByVal Series As
Long, ByVal ValueIndex As Long)
Dim Clicked
With TChart1
For i = AMax To AMin
Clicked = .Series(0).Clicked(X, i)
If Clicked <> -1 Then
.Tools.Items(0).Active = True
.Tools.Items(0).asAnnotation.Shape.Left = X
.Tools.Items(0).asAnnotation.Shape.Top = i
.Tools.Items(0).asAnnotation.Text = .Axis.Left.CalcPosPoint(i)
End If
Next i
End With
End Sub
--
Best Regards,
Christopher Ireland
http://support.steema.com
"Important note: If you are a TeeChart registered customer, please post your
support questions at Steema's Support monitored Forums for customers:
http://support.steema.com for a prompter reply."