Page 1 of 1

colorline error for TeeChart Pro Activex 5

Posted: Wed May 26, 2004 8:39 am
by 6925597
when i use Tchart.tools.items(0).asColorLine ,don't work as me thing:

code for vbscript:

TChart1.Import.LoadFromURL(**)
idx = Tchart1.tools.add(tcColorLine)
Tchart1.tools.items(idx).active=true
Tchart1.tools.items(idx).asColorLine.axis = atLeft
Tchart1.tools.items(idx).asColorLine.value =200



But the line position is not expected

Posted: Wed May 26, 2004 9:48 am
by Pep
Hi,

using the following code works fine, you should use constants enums.. :

Code: Select all

Sub FillChart()
TeeCommander1.Chart = TChart1
With TChart1
    .Import.LoadFromURL("http://localhost/test.tee")
    idx = .Tools.Add(6)
    .Tools.Items(idx).Active = True
    .Tools.Items(idx).asColorLine.Axis = 0
    .Tools.Items(idx).asColorLine.Value = 20
End With
End Sub

I have resolved this question!

Posted: Wed May 26, 2004 10:04 am
by 6925597
TChart1.Import.LoadFromURL("***")

at the beginning of url ASP page add follow code:

Code: Select all

<!--METADATA NAME="TeeChart Pro v5 ActiveX Control" TYPE="TypeLib" UUID="{B6C10482-FB89-11D4-93C9-006008A7EED4}"-->

but why? the edition of Teechart?

Posted: Wed May 26, 2004 2:53 pm
by Pep
Hi,
but why? the edition of Teechart?
I'm sorry, I don't understand you, could you please be more specific ?

Posted: Thu May 27, 2004 2:30 am
by 6925597
I'm sorry, I don't understand you, could you please be more specific ?
I only want to add colorline in my chart, i do:

1.creat a asp page ,within it I create chart ,then save to stream
2.create a html page ,within it I use activeX by LoadFromURL method

question: if I don't add

Code: Select all

<!--METADATA NAME="TeeChart Pro v5 ActiveX Control" TYPE="TypeLib" UUID="{B6C10482-FB89-11D4-93C9-006008A7EED4}"--> 
for the asp page in the step 1,the colorline position is unexcepted.

Posted: Sun May 30, 2004 9:06 pm
by Marc
Hello,

The metadata instruction at the beginning of an ASP file tells ASP where to look for named constants. If it is not included then you should use the integer equivalent.

eg. (See EToolClass in help)
Integer Values:
tcCursor = 0
tcDragMarks = 1
tcAxisArrow = 2
tcDraw = 3
tcHints = 4
tcColorband = 5
tcColorLine = 6
tcRotate = 7
tcMarksTip = 8
tcChartImage = 9
tcAnnotate = 10
tcPageNumber = 11

Without the metadata declaration "tcColorLine" will not be recognised and 0 will be used instead (as if it were a Cursor tool). An alternative to the metadata line could be to include a reference to a constants file (it ships with TeeChart below the IIS & ASP folder in JScript and VBScript formats). Please see Tutorial 9 for a further look at what I've just described.

Regards,
Marc Meumann

thanks a lot.

Posted: Mon May 31, 2004 3:35 am
by 6925597
thanks a lot.