Points and Marks outside chart

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
tiyo
Newbie
Newbie
Posts: 4
Joined: Tue Apr 08, 2003 4:00 am

Points and Marks outside chart

Post by tiyo » Fri May 26, 2006 2:20 pm

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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri May 26, 2006 2:34 pm

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:.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

tiyo
Newbie
Newbie
Posts: 4
Joined: Tue Apr 08, 2003 4:00 am

I found something for my case

Post by tiyo » Wed May 31, 2006 1:49 pm

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);
}
}

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed May 31, 2006 1:55 pm

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply