Page 1 of 1

Map Series and Zoom

Posted: Mon Jun 06, 2022 10:17 pm
by 17593702
Just getting used to the map series and I hope there is a simple answer,
The zoom and scroll function work great, until I add some code to the OnSeriesClick event. Then that code takes precedence and the zoom function fails to start. This would be on a map , say, and the user is clicking on a state or province and in this case it is desired that clicking anywhere in the polygon that represents the state will perform the OnSeriesClick event.

Is this the behaviour I should expect to see?

Best Regards

Peter

Re: Map Series and Zoom

Posted: Wed Jun 15, 2022 1:24 pm
by yeray
Hello Peter,

Indeed, the event is capturing the action and not propagating the event.
If you want to change this behaviour, you can set CancelMouse property to False:

Code: Select all

procedure TForm1.Chart1ClickSeries(Sender: TCustomChart; Series: TChartSeries;
  ValueIndex: Integer; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
  Sender.CancelMouse:=False;
end;