Page 1 of 1

Problem with TChartScrollBar

Posted: Mon Oct 04, 2004 10:19 am
by 9339326
Hi,

I have a problem with TChartScrollBar. If I create a simple graph displaying a curve with random values having x values in the range [0,50]everything works fine. But if the domain of the x values is [10,60] I have problems with zooming. Tracking a rect with xmin=20 and xmax=40 the graph axis are zoomed to [10,30].

The problem ist the TChartScrollBar as the values of the axes are changed in the FOnZoom event which is connected to the scrollbar. Is there a solution or am I doing something wrong?

Thanks,

Peter

Posted: Fri Oct 08, 2004 5:24 pm
by Pep
Hi Peter,

yes, the problem is TChartScrollBar is not yet fully functional. I think the
problem is in the TChartScrollBar.RecalcPosition implementation. We'll try
to improve this for next release. In the meantime the "solution" would be to use regular TScrollBar and manually change axis scale by using
TChartAxis.SetMinMax method (zooming and scrolling is merely changing axis minimum and maximum value).