Page 1 of 1

Clamp data after Setting the Min Max of custom axis

Posted: Mon Feb 15, 2010 2:42 pm
by 15654246
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

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

Posted: Mon Feb 15, 2010 3:21 pm
by narcis
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.

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

Posted: Mon Feb 15, 2010 4:40 pm
by 15654246
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 5817 times

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

Posted: Mon Feb 15, 2010 5:24 pm
by 15654246
Hi,
I have created one sample project to show you the problem.
ClipProblem.zip
(40.18 KiB) Downloaded 587 times
Regards,
Avijit

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

Posted: Mon Feb 15, 2010 6:29 pm
by narcis
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.