Page 1 of 1

Points and Marks outside chart

Posted: Fri May 26, 2006 2:20 pm
by 8119890
Hi,

When I remove the errors off the chart by clicking in the error's checkbox legend, some of the points (and is mark) are going outside the chart. It seems that the maximum value of the X axis is declining.

Sorry for my english, my first language is french :)

Tiyo

Posted: Fri May 26, 2006 2:34 pm
by narcis
Hi Tiyo,

You can try setting TeeChart's ClipPoints property to true:

Code: Select all

      tChart1.Aspect.ClipPoints = true;
Another alternative is implementing the following code on TeeChart's AfterDraw event:

Code: Select all

    private void tChart1_AfterDraw(object sender, Steema.TeeChart.Drawing.Graphics3D g)
    {
      tChart1.Graphics3D.ClipRectangle(tChart1.Chart.ChartRect);
    }
If after aplying my suggestions the problem still persists please send us an example we can run "as-is" to reproduce the problem here.

You can post your files at news://www.steema.net/steema.public.attachments newsgroup.
Sorry for my english, my first language is french


Don't worry, my mother tongue is catalan :wink:.

I found something for my case

Posted: Wed May 31, 2006 1:49 pm
by 8119890
Hi Narcis,

I finnaly found something working for my code. In my code, the X axis can be switch from "number of days" to "dates". In this case, the code was switching from automatic to manuel axis minimum and maximum. Now I set the min and max manually in the tChart_BeforeDraw event depending wich case we are (days or dates). Now it seems to work properly. I send you this part of the code, maybe It could help another customer one day.

Thanks again and have a nice day !

Tiyo

private void _tChart_BeforeDraw(object sender, Steema.TeeChart.Drawing.Graphics3D g) {
double minimum = _tChart.Axes.Bottom.MinXValue;
double maximum = _tChart.Axes.Bottom.MaxXValue;

if (_radioDays.Checked)
{
_tChart.Axes.Bottom.Minimum = 0;
_tChart.Axes.Bottom.Maximum = maximum + System.Math.Floor(maximum / 6);
}
else
{
_tChart.Axes.Bottom.Minimum = minimum - System.Math.Floor(minimum / 1000);
_tChart.Axes.Bottom.Maximum = maximum + System.Math.Floor(maximum / 1000);
}
}

Posted: Wed May 31, 2006 1:55 pm
by narcis
You're welcome Tiyo.

I'm glad to hear you could solve the problem. Thanks for your input to the forums, it may be helpful to other users.