Hi,
I am having two graphs on two different axis(i.e. Left and Custom Axis having same x-Axis).
I need to stop vertical panning of second graph which having custom axis, so that only one graph can be moved and other will be static at all time.
Regards,
Krishna.
Need to customize panning
Hi Krishna,
you can use the OnAllowScroll event :
you can use the OnAllowScroll event :
Code: Select all
procedure TForm1.Chart1AllowScroll(Sender: TChartAxis; var AMin,
AMax: Double; var AllowScroll: Boolean);
begin
if Sender = Chart1.CustomAxes.Items[0] then
AllowScroll:=False;
end;
Pep Jorge
http://support.steema.com
http://support.steema.com
customize panning in VCL
Hi,
The following is the source code given by you can be used for applications, but, I need to develop VCL so, which property/ event I should override.
I found the AllowScroll is property of type TChartScrollEvent. How should i Implement the below logic code for override of AllowScroll in VCL
procedure TForm1.Chart1AllowScroll(Sender: TChartAxis; var AMin,
AMax: Double; var AllowScroll: Boolean);
begin
if Sender = Chart1.CustomAxes.Items[0] then
AllowScroll:=False;
end;
The following is the source code given by you can be used for applications, but, I need to develop VCL so, which property/ event I should override.
I found the AllowScroll is property of type TChartScrollEvent. How should i Implement the below logic code for override of AllowScroll in VCL
procedure TForm1.Chart1AllowScroll(Sender: TChartAxis; var AMin,
AMax: Double; var AllowScroll: Boolean);
begin
if Sender = Chart1.CustomAxes.Items[0] then
AllowScroll:=False;
end;