How to accomplish this?

TeeChart for ActiveX, COM and ASP
Post Reply
Marc
Site Admin
Site Admin
Posts: 1272
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona
Contact:

Post by Marc » Thu Dec 18, 2003 1:39 pm

Hello,

The Charting of the data is straightforward provided you have codeable access to the data tables you included in your post.

Assuming the data to form part of an array:

- the X data is the first column
- The First LineSeries is Type A (2nd column)
- The 2nd LineSeries is Type B (3rd column)
....etc.

As you step the arrays you simply take the column entry and add it, with the X value to the applicable LineSeries.

eg.
For X = 0 To 9
For YY = 1 To 4
TChart1.Series(YY).AddXY X, TheArray(X, YY), "", clTeeColor
Next YY
Next X

Regards,
Marc Meumann
Steema Support

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

Post by Pep » Fri Jan 09, 2004 4:31 pm

Hi,

1) There're two options :
- You can use Multiple Legends : You can see one example of this in the TeeChart Pro v6 Demo Features project under :
Welcome ! -> Previous Version -> New Features -> Chart -> Legend -> Multiple Legends

or

- Use the Legend and the Custom Draw : You can see one example in the Demo Features project under :
Welcome ! -> Previous Version -> New Features -> Chart -> Legend -> Drawing more text.

2). If I use .AddXY 0, 100 and .AddXY 50, 50
The number of Labels on the X-axis will depend on the Labelsize, increment, etc. Automatic Axis settings will do a best fit but you can override and define the exact Labels you want using Axis settings. See the 'Working with Axes' tutorial. The Axes will not necessarily be proportional. That is quite dificult to achieve and requires that the size of Titles, Legend, etc be taken into account or removed.

Josep Lluis Jorge
http://support.steema.com

Post Reply