Page 1 of 1

Axis scroll tool issue when nothing has been drawn yet....

Posted: Mon Apr 03, 2006 11:01 pm
by 9637279
Hi,

I have a tchart with an axis scroll tool associated with it.
when I scroll the axis (the 'hand' cursor shows) BEFORE drawing
my series and then draw the series then the axis will not adjust but
is stuck at the 0-value, i.e.
1. load tchart with scroll axis tool
2. scroll the axis up/down with the tool (even though nothing is drawn yet)
3. load some series
->the axis will not adjust properly but is stuck with regard to min/max.

I noticed this also when real time is acquired and the incoming data is like a flat line for some time and I scroll the axis up/down with the axis scroll tool then the axis is likely to stay stuck in a small min/max interval even though later data with higher amplitude comes in.
Once the min/max range is 'big enough' (before using the tool) then it seems to act fine

Is there a simple work around for this problem?
Many thanks!
fano

Posted: Tue Apr 04, 2006 10:06 am
by narcis
Hi fano,

This is necessary because the tool changes axes minimum and maximum values. When this happens the axis automatic settings are disabled. However, you can solve it by setting the axis back to automatic before populating series:

Code: Select all

    private void button1_Click(object sender, EventArgs e)
    {
      tChart1.Axes.Left.Automatic = true;
      fastLine1.FillSampleValues();
    }
This can not be done by the tool itself as the scroll wouldn't be visible because the axis would be immediatelly set to automatic cancelling tool's job.