colorline error for TeeChart Pro Activex 5

TeeChart for ActiveX, COM and ASP
Post Reply
ColorLine for TeeChart Pro Activex 5
Newbie
Newbie
Posts: 7
Joined: Fri Nov 15, 2002 12:00 am
Contact:

colorline error for TeeChart Pro Activex 5

Post by ColorLine for TeeChart Pro Activex 5 » Wed May 26, 2004 8:39 am

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

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Wed May 26, 2004 9:48 am

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

ColorLine for TeeChart Pro Activex 5
Newbie
Newbie
Posts: 7
Joined: Fri Nov 15, 2002 12:00 am
Contact:

I have resolved this question!

Post by ColorLine for TeeChart Pro Activex 5 » Wed May 26, 2004 10:04 am

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?

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Wed May 26, 2004 2:53 pm

Hi,
but why? the edition of Teechart?
I'm sorry, I don't understand you, could you please be more specific ?

ColorLine for TeeChart Pro Activex 5
Newbie
Newbie
Posts: 7
Joined: Fri Nov 15, 2002 12:00 am
Contact:

Post by ColorLine for TeeChart Pro Activex 5 » Thu May 27, 2004 2:30 am

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.

Marc
Site Admin
Site Admin
Posts: 1272
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona
Contact:

Post by Marc » Sun May 30, 2004 9:06 pm

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

ColorLine for TeeChart Pro Activex 5
Newbie
Newbie
Posts: 7
Joined: Fri Nov 15, 2002 12:00 am
Contact:

thanks a lot.

Post by ColorLine for TeeChart Pro Activex 5 » Mon May 31, 2004 3:35 am

thanks a lot.

Post Reply