Waterfall plots and z Planes

TeeChart for ActiveX, COM and ASP
Post Reply
Mekon
Newbie
Newbie
Posts: 3
Joined: Fri Dec 05, 2003 5:00 am
Location: UK
Contact:

Waterfall plots and z Planes

Post by Mekon » Wed Jun 02, 2004 1:11 pm

Hi Pep

Thanks for your reply regarding Z Planes and use of Cursor Control, but I have tried what you suggested for item 4. and the suggestion does not appear to work. All it does is to add an additional 256 empty points to the 256 points plotted. Each of the data points represents a bucket of width 1.953 and therefore 256 * 1.953 = 500 hence the X axis scaling. So the graph being plotted has only 256 points but the X axis needs to be annotated from 0 to 500. So in effect I need to scale the 256 points to 500 not add an additional .

As part of what I am trying to do
I have a data file containing (256 data points) * 10 which I am trying to plot using the Tchart waterfall plot. Z plane code not shown.
The code I have written to do this is as follows:

' Add point to chart
With TChart1.Series(0).asWaterfall
For X = 0 To NumXValues ‘(255)
Line Input #fileno, YVal
.AddXYZ X, YVal, Z, "", clTeeColor
Next X
End With
If EOF(fileno) Then GoTo labelX

This above code appears to work correctly, but when I use the following code the waterfall does not plot at all.

' Add point to chart
With TChart1.Series(0).asWaterfall
For X = 0 To int(256*1.953) step 1.953 ‘ plot 256 points at X interval 1.953
Line Input #fileno, Yval ‘ fetch value from data file.
.AddXYZ X, YVal, Z, "", clTeeColor
Next X
End With
If EOF(fileno) Then GoTo labelX

Can you explain what I am doing wrong. Is it that X has to be an integer and be consecutive ??? e.g 1,2,3, not 1,3,5,etc.

Your help would be appreciated.

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

Post by Pep » Thu Jun 03, 2004 7:27 am

Hi,
Can you explain what I am doing wrong. Is it that X has to be an integer and be consecutive ??? e.g 1,2,3, not 1,3,5,etc.
You can use non-integer values with 3DSeries if you set IrregularGrid to True before to add the Data, e.g.

Code: Select all

' Add point to chart 
With TChart1.Series(0).asWaterfall 
.IrregularGrid = True
For X = 0 To int(256*1.953) step 1.953 ' plot 256 points at X interval 1.953 
Line Input #fileno, Yval ‘ fetch value from data file. 
.AddXYZ X, YVal, Z, "", clTeeColor 
Next X 
End With 
If EOF(fileno) Then GoTo labelX 

Post Reply