Page 1 of 1

Bottom axis increment does not work

Posted: Fri Jul 09, 2004 1:00 pm
by 9078356
:cry: Pb with bottom axis increments under manual update of chart points

Platform VB6/Visual studio 6. Using Tchacrt 6 to 6.005
draw a teechart object on a form.
use a single series (series (0)) (use fast line type)
set all axis to automatic. (bottom and left used only)

Put an event into a button whereby say 5 points are to be drawn
bottom between 0 and 65000 and left axis between -10000 and +10000.
These are random points and can be modified by the programmer.

The bottom axis displays the wrong labels.
If only say point number 2 has its abcissae changed by +2000
the X axis displays the wrong labels???? Tchart.repaint is executed every time the 5 points are redrawn.
When two points have the same X but different Ys the chart shows two points that are separate on X axis!!! the value of the label is the same though.
every time a point is changed, I clear the series and then add all five points (tchart1.series(0).add y,x,clteecolor) and then execute a tchart.repaint.


The left axis works fine under similar circumstances though!!!!

Could you please help. I can't believe this should happen.

Best regards

Posted: Tue Jul 13, 2004 6:46 am
by Chris
Hi,

The following code works as expected here:

Code: Select all

Private Sub Form_Load()
With TChart1
    .AddSeries scFastLine
    .Aspect.View3D = False
    .Series(0).Marks.Visible = True
    .Series(0).Marks.Style = smsXY
    For i = 0 To 65000 Step 15000
        If i = 30000 Then
            .Series(0).AddXY i, Rnd * 1000, "", clTeeColor
            .Series(0).AddXY i, Rnd * 1000, "", clTeeColor
        Else
            .Series(0).AddXY i, Rnd * 1000, "", clTeeColor
        End If
    Next i
End With
End Sub
Were you using Add() or AddXY() for your tests? If you are still experiencing problems, could you please post a code snippit which I can run "as-is" to reproduce it here?

Many thanks!