Page 1 of 1

restrict scroll inside axes only

Posted: Wed Nov 18, 2009 7:20 pm
by 10546846
Tchart 8.06.
Must be an easy one but cannot find the solution, it's not occurred on many other apps with Tcharts.

I have Tchart with 10 Tlineseries, X and Y axes, draws a few thousand x,y points on each series.

If I scroll with right mouse button in either X orY I can drag the series drawings outside of the region inside the axes, the curves go outside the axes.
How do I prevent this, must be a switch somewhere but can't find it. Sorry. :(

thanks
Sean

Re: restrict scroll inside axes only

Posted: Thu Nov 19, 2009 3:08 pm
by yeray
Hi Sean,

Are you using custom axes? Please take a look at the demo at All features\Welcome !\Axes\Opaque zones to see an example of how you could clip a series to a region.
If you still have problems with it, please send us a simple example project we can run as-is to reproduce the problem here and we'll take a look at it.

Re: restrict scroll inside axes only

Posted: Thu Nov 19, 2009 3:37 pm
by 10546846
thanks Yeray,

No, not custom axes. I think I've figured out why it's occurred, but not yet how to fix. For the the three charts in question i was experimenting last week with using OpenGL-3D, and then I returned back to normal, and I suspect one of the clipping parameters has remained unstuck somewhere aloing the line
cheers
Sean

Re: restrict scroll inside axes only

Posted: Thu Nov 19, 2009 3:54 pm
by 10546846
Is it possible that somehow the global procedure unclipcanvas has caused my issue, and i need to run clipcanvas. But how do I do that?

Re: restrict scroll inside axes only

Posted: Thu Nov 19, 2009 4:20 pm
by yeray
Hi Sean,

With Chart1.ClipPoints:=false; the series can be moved out of the ChartRect, and setting it to true, they are not drawn into the ChartRect.
On the other hand, yes, we are aware of the problems with opengl and the series clipping.

Re: restrict scroll inside axes only

Posted: Fri Nov 20, 2009 7:33 am
by 10546846
thanks Yeray, I think it must have beren related to having used opengl on these charts, I deleted the chats affected and replaced with new. All series creation and handling is in code, so the only changes were to replace three charts and give them different names, the code for adding and controlling series is identical except for the chart names. scroll behaviour now as expected.
cheers
Sean