Restricting Axis Scroll
Posted: Fri Sep 01, 2006 4:20 am
Hi,
I have disabled default panning of the chart and used two "axis scroll tool" to move the graph.(i.e one axis scroll is used for left and another for bottom).
I have restricted the axis scroll if it exceeds the graph points(minimum and maximum). The user should not go beyond the total graph points either left or bottom axis.
sample values are given to stop the panning as follows:(0,25)
if Self.Chart1.BottomAxis.Minimum < 0 then
Self.Chart1.BottomAxis.Minimum := 0;
if Self.Chart1.BottomAxis.Maximum > 25 then
Self.Chart1.BottomAxis.Maximum := 25;
The above code I have written in mousemove to restrict.
As I have expected the scrolling is stopped at the specified point and not going beyond, but the chart is expanding and not able to control.
even if the zoom out is done, the graph not coming to its original position
I need the scroll to be stopped and the chart should not expand and graph should remain same.
could you please help me in this problem.
Thanks,
Krishna.
I have disabled default panning of the chart and used two "axis scroll tool" to move the graph.(i.e one axis scroll is used for left and another for bottom).
I have restricted the axis scroll if it exceeds the graph points(minimum and maximum). The user should not go beyond the total graph points either left or bottom axis.
sample values are given to stop the panning as follows:(0,25)
if Self.Chart1.BottomAxis.Minimum < 0 then
Self.Chart1.BottomAxis.Minimum := 0;
if Self.Chart1.BottomAxis.Maximum > 25 then
Self.Chart1.BottomAxis.Maximum := 25;
The above code I have written in mousemove to restrict.
As I have expected the scrolling is stopped at the specified point and not going beyond, but the chart is expanding and not able to control.
even if the zoom out is done, the graph not coming to its original position
I need the scroll to be stopped and the chart should not expand and graph should remain same.
could you please help me in this problem.
Thanks,
Krishna.