Page 1 of 1

Automatic min-max

Posted: Mon Oct 18, 2004 3:19 pm
by 9524413
How is the automatic min-max of an axis intended to work?

I'm using teechart to display data every 10 sec. The x-data has a fixed width (512 channels). The y-data is variable. So my y-axis is set with a fixed minimum of zero and the maximum is set to automatic maximum.

So every ten seconds i do a series(0):clear and add the new data.
In V5 the status of the auto maximum was retained and the y-axis scaled automaticly. In V7 i have to set the auto maximum everytime i update the data.

Why is the functionality of the automatic maximum changed in V7 ?

Greetings,

Jack

Posted: Wed Oct 20, 2004 7:37 am
by Chris
Hi Jack,
So every ten seconds i do a series(0):clear and add the new data.
In V5 the status of the auto maximum was retained and the y-axis scaled automaticly. In V7 i have to set the auto maximum everytime i update the data.
The following code works in the same way in both AX5.0.6.0 and AX7.0.0.2:

Code: Select all

Private Sub Command1_Click()
Timer1.Enabled = Not Timer1.Enabled
End Sub

Private Sub Form_Load()
Timer1.Interval = 10
Command1.Caption = "Running"
With TChart1
    .Aspect.View3D = False
    .AddSeries scLine
    .Axis.Left.AutomaticMinimum = False
    .Axis.Left.Minimum = -100
End With
End Sub

Private Sub Timer1_Timer()
With TChart1
    If .Series(0).Count > 100 Then
        .Series(0).Clear
        Timer1.Enabled = False
        Command1.Caption = "Start"
    Else
        .Series(0).Add Rnd * 100, "", clTeeColor
        Command1.Caption = "Running"
    End If
End With
End Sub
Could you please modify the above code snippet so I can reproduce your problem here?

Many thanks!

Posted: Wed Oct 20, 2004 11:10 am
by 9524413
Ï'm not a Delphi developer. I use the following code :

SELF:Series(0):clear()
dw_alen:=ALen(adata)

FOR i:=1 TO dw_alen STEP dw_stap
SELF:Series(0):asFastLine:AddRealTime(i,adatai],'',clteecolor)
NEXT

adata is an array with 512 elements of dwords. Self refers to the teechart control.

Example :

Update max. in adata max y-axis automax. checkbox
0, unkown, 0, checked
1 100 100 unchecked <-- after first measurement
2 120 120 unchecked <-- correct update of y-axis dispite unchecked box
3 90 120 unchecked <--here it goes wrong
4 130 130 unchecked <--this would be correct behaviour of the automax y-axis
5 50 130 unchecked <-- still wrong

Manual check of y-axis auto maximum
- unknown 130 checked
6 70 70 checked <-- correct update "down"
7 50 50 checked <-- correct update down again
8 90 90 unchecked <-- correct update up but check is gone
9 120 120 unchecked <-- correct update up
10 90 120 unchecked <--no update down !!

I hope this clarifices what i'm trying to tell you.

Greetings

Jack

Posted: Thu Oct 21, 2004 7:08 am
by Chris
Hi Jack,
Ï'm not a Delphi developer. I use the following code :
Mmm. Which version of TeeChart are you using (TeeChart Pro ActiveX Control or TeeChart Pro for Delphi) and in which IDE are you programming?

I'm afraid to say that I still don't fully understand the nature of the problem. I would *greatly* appreciate it if you could post a small program (to news://www.berneda.com/steema.public.attachments) that I can run "as-is" to reproduce the problem here.

Many thanks!

Posted: Thu Oct 21, 2004 8:36 am
by 9524413
OK. My fault. It all works in stand-alone code. Something else must be wrong.

Sorry for your time.

Greetings

Jack