Page 1 of 1

Problem with adding more than one series to the Datasource

Posted: Sun Jun 06, 2004 6:47 pm
by 9080930
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.

Posted: Sun Jun 06, 2004 11:18 pm
by Pep
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 ?

Posted: Tue Jun 08, 2004 5:59 pm
by 9080930
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 ?

Posted: Wed Jun 09, 2004 1:22 am
by Pep
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.