Clamp data after Setting the Min Max of custom axis

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Avijit
Newbie
Newbie
Posts: 72
Joined: Tue Sep 15, 2009 12:00 am

Clamp data after Setting the Min Max of custom axis

Post by Avijit » Mon Feb 15, 2010 2:42 pm

Hi,
I am using TeeChart for plotting my data as FastLine.
I am using multiple Custom vertical axises for drawing data.
Now if i am changing the Vertical Custom axe's MinMax value using SetMinMax function then data is going out of the Axis region.(Drawn out side)
Is there anyway i can clamp the data that are out side the Vertical custom axis region?

Regards,
Avijit

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

Re: Clamp data after Setting the Min Max of custom axis

Post by Narcís » Mon Feb 15, 2010 3:21 pm

Hi Avijit,

You can clip ChartRect like this:

Code: Select all

			Rectangle rect = tChart1.Chart.ChartRect;
			tChart1.Graphics3D.ClipRectangle(rect);
For a complete ClipRectangle example look at this thread.
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

Avijit
Newbie
Newbie
Posts: 72
Joined: Tue Sep 15, 2009 12:00 am

Re: Clamp data after Setting the Min Max of custom axis

Post by Avijit » Mon Feb 15, 2010 4:40 pm

Hi Narcis,
I tried as you suggested but it did not work for me.
What i did,
I have 10 fastline series. Each series having NaN data also.
For all the series the bottom axis is TeeChart.Axes.Bottom.
For each series it has its own Custom verical axis.
Vertical axis positions are like -
Axis 1 -
Start pos- 0
EndPos - 25
Axis 2 -
Start Pos - 26
EndPos - 50
Axis 3 -
StartPos - 51
EndPos - 75.

So that the axises are drawn in separate area.
I have subscribed to the BeforeDrawValue event of Each of the fastline series.
But only the 1st fastline series is getting drawn. All other series are not drawn.

See the screen shot below -
TrendsNotDrawn.JPG
TrendsNotDrawn.JPG (37.99 KiB) Viewed 5816 times

Avijit
Newbie
Newbie
Posts: 72
Joined: Tue Sep 15, 2009 12:00 am

Re: Clamp data after Setting the Min Max of custom axis

Post by Avijit » Mon Feb 15, 2010 5:24 pm

Hi,
I have created one sample project to show you the problem.
ClipProblem.zip
(40.18 KiB) Downloaded 587 times
Regards,
Avijit

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

Re: Clamp data after Setting the Min Max of custom axis

Post by Narcís » Mon Feb 15, 2010 6:29 pm

Hi Avijit,

Ok, now I understand which is the exact problem. In that case you should do as in the All Features\Welcome!\Axes\Opaque zones and use ClearClipRegions in the AfterDraw event.
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