Hello!
I have a TChart with a TPointSeries on it.
I activated zoom on the TChart.
On the PointSeries I have a SeriesClickPointer event. So when I click on a node on the PointSeries it triggers a popup of a presentation form with info about the "ValueIndex" node clicked.
This all works fine, but when I close the presentation form my TChart is in zoom mode, that means my next klick on another node on the PointSeries does not trigger the SeriesClickPointer event, instead it zooms my chart.
Please help with this. I dont understand why the click event on a node on the series still activates the zoom function...
Best regards, Mikael
Zoom gets activated when clicking on a series
Re: Zoom gets activated when clicking on a series
Hi Mikael,
You could try disabling the zoom at the OnMouseDown event, if a pointer is clicked, and re enable it at OnMouseUp event:
You could try disabling the zoom at the OnMouseDown event, if a pointer is clicked, and re enable it at OnMouseUp event:
Code: Select all
procedure TForm1.Chart1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
if Chart1[0].Clicked(X,Y)>-1 then
Chart1.AllowZoom:=false;
end;
procedure TForm1.Chart1MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
Chart1.AllowZoom:=true;
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |