Issue with using the OnGetSeriesMark event in VBScript

TeeChart for ActiveX, COM and ASP
Post Reply
scott
Newbie
Newbie
Posts: 10
Joined: Mon Dec 22, 2003 5:00 am
Location: Phoenix, AZ

Issue with using the OnGetSeriesMark event in VBScript

Post by scott » Tue Dec 07, 2004 12:43 am

I am attempting to use the OnGetSeriesMark event to update the marktext, but am having difficulty being able to modify the value. I am using the following code:

Code: Select all

Sub TChart1_OnGetSeriesMark(SeriesIndex , ValueIndex ,ByRef MarkText )
'msgbox "OnGEtSeriesMark"
	If ValueIndex > 0 Then
		If TChart1.Series(SeriesIndex).YValues.Value(ValueIndex) > TChart1.Series(SeriesIndex).YValues.Value(ValueIndex - 1) Then
			MarkText = MarkText & " (Up)"
		ElseIf TChart1.Series(SeriesIndex).YValues.Value(ValueIndex) < TChart1.Series(SeriesIndex).YValues.Value(ValueIndex - 1) Then
			TChart1.Series(SeriesIndex).Marks.ArrowLength = 5
			MarkText = MarkText  & "(Down)"
		Else
			TChart1.Series(SeriesIndex).Marks.ArrowLength = 25
			MarkText = MarkText  & "(No change)"
		End If
		TChart1.Series(SeriesIndex).Marks.BackColor = TChart1.Series(SeriesIndex).Color
	End If
End Sub
The setting of the ArrowLength works great, but since marktext is setup as a ByRef calling parameter, it appears that in VBScript, I am unable to actually change the contents of MarkText. Is there something else that I have to do to get this to work in IE and VBScript?

Thanks,
Scott Small

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Tue Dec 07, 2004 10:52 am

Hi,
The setting of the ArrowLength works great, but since marktext is setup as a ByRef calling parameter, it appears that in VBScript, I am unable to actually change the contents of MarkText. Is there something else that I have to do to get this to work in IE and VBScript?
This problem also seems to be reproducible in Internet Explorer, where there seems to be an incompatibility in the passing of text from an ActiveX Control back to this environment. A solution would be to use Annotation Tools instead of ISeries Marks and change the text that way.
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

Post Reply