Problem with adding more than one series to the Datasource

TeeChart for ActiveX, COM and ASP
Post Reply
Reza
Newbie
Newbie
Posts: 3
Joined: Fri Feb 20, 2004 5:00 am

Problem with adding more than one series to the Datasource

Post by Reza » Sun Jun 06, 2004 6:47 pm

Hello

I have problem with adding more than one series to the Datasource property.

I am using the command

TChart1.Series(2).DataSource = "Series0, Series1"

as suggested by the TeechartAX help file. The problem that I encounter is that only the first series (Series0 in this example) gets added.

Can someone tell me how I can add both series to my Datasource.

I would be grateful for any suggestions.
Regards,
Reza.

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

Post by Pep » Sun Jun 06, 2004 11:18 pm

Hi Raza,

which TeeChart Pro version are you using ?
I've tried to reproduce the problem using the following code and works fine here :

Code: Select all

Private Sub Form_Load()
With TChart1
    For i = 0 To 2
      .AddSeries scLine
    Next i
    .Series(0).FillSampleValues (10)
    .Series(1).FillSampleValues (10)
    .Series(2).SetFunction tfAverage
    .Series(2).DataSource = "Series0,Series1"
    .Series(2).FunctionType.asAverage.IncludeNulls = True
End With
End Sub
If you still having problems, could you please post the a code here with which I can reproduce the problem "as-is" here ?

Reza
Newbie
Newbie
Posts: 3
Joined: Fri Feb 20, 2004 5:00 am

Post by Reza » Tue Jun 08, 2004 5:59 pm

Hi Pep,

Thank you for the reply. Having looked at your example I now can see where the problem lied with my code.

In my code I had a space between the two series as shown below.

Code: Select all

.Series(2).DataSource = "Series0, Series1"
Without the space it works fine. Writing the code this way will only pick up the first series for the datasource.

It then seems that there is a small mistake in the Teechart Pro AX help file which needs amending.

Many thanks,
Reza

Pep wrote:Hi Raza,

which TeeChart Pro version are you using ?
I've tried to reproduce the problem using the following code and works fine here :

Code: Select all

Private Sub Form_Load()
With TChart1
    For i = 0 To 2
      .AddSeries scLine
    Next i
    .Series(0).FillSampleValues (10)
    .Series(1).FillSampleValues (10)
    .Series(2).SetFunction tfAverage
    .Series(2).DataSource = "Series0,Series1"
    .Series(2).FunctionType.asAverage.IncludeNulls = True
End With
End Sub
If you still having problems, could you please post the a code here with which I can reproduce the problem "as-is" here ?

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

Post by Pep » Wed Jun 09, 2004 1:22 am

Hi Raza,
It then seems that there is a small mistake in the Teechart Pro AX help file which needs amending.
Yes, thanks for the advise. We'll fix it.

Post Reply