ClipRectangle function not working in an ASP.NET page

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Heraclitus
Newbie
Newbie
Posts: 10
Joined: Thu Jul 07, 2005 4:00 am

ClipRectangle function not working in an ASP.NET page

Post by Heraclitus » Mon Sep 12, 2005 9:23 pm

I am using TeeChart.NET version (2.0.1992.14012), and I am running into a problem with clipping series values that are greater then the max set for a custom axis.

In my case, I have three different vertical custom axes on a particular chart. Each custom axis has its max and min set programmatically (instead of automatic). The problem is that some of the series data is greater than a particular custom axis. Hence, the line drawn goes right past a custom axis and into another.

I used some code from the TeeChart samples project under All Features -> Axis -> Opaque zones to try and clip the larger series values. This did not work.

Here is a relevant code snippet:

Code: Select all

private void series1_BeforeDrawValues(object sender, Steema.TeeChart.Drawing.Graphics3D g)
{
    Steema.TeeChart.Styles.Series series = sender as Steema.TeeChart.Styles.Series;

    if (series != null)
   {
        int left = series.GetHorizAxis.IStartPos;
        int right = series.GetHorizAxis.IEndPos;
        int top = series.GetVertAxis.IStartPos;
        int bottom = series.GetVertAxis.IEndPos;

        g.ClipRectangle(left, top, right, bottom);
    }
}

private void series1_AfterDrawValues(object sender, Steema.TeeChart.Drawing.Graphics3D g)
{
    g.UnClip();
}

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

Post by Narcís » Tue Sep 13, 2005 10:55 am

Hi Heraclitus,

Instead of using UnClip method you'd better use ClearClipRegions.
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

Heraclitus
Newbie
Newbie
Posts: 10
Joined: Thu Jul 07, 2005 4:00 am

Post by Heraclitus » Tue Sep 13, 2005 6:39 pm

Hi Narcis,

Thank you for the quick reply.

Unfortunately, I was not able to find a function called ClearClipRegions in my version of TeeChart.NET. I also could not find this function in the installed help. Can you direct me to where this function is?

Thanks again.

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 Sep 14, 2005 10:43 am

Hi Heraclitus,

Try using:

Code: Select all

		private void series1_AfterDrawValues(object sender, Steema.TeeChart.Drawing.Graphics3D g) 
		{ 
			g.ClearClipRegions();
		} 
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