[solved] How to get OnClick event for TTitleFootClickTool lazarus / 55-TAChart ---------------------------------------------------------------------- Muso · 2021-04-17 03:02 I need the new features TTitleFootClickTool and TLegendClickTool. So I got the latest Laz 2.1 via fcupdeluxe. In my chart I have set the TChartToolset which contains TTitleFootClickTool . But when I click at runtime at the title of the chart, the OnClick event is not triggered. The same is for the legend. To test I added to the TChartToolset a data crosshair tool and there e.g. the OnDraw event is correctly triggered. As next test I added a DataPointClickTool. But there the OnPointClick is also not triggered on clicking on a data point on the chart. Therefore I am a bit lost. Do I have to do something special to trigger the click events? ---------------------------------------------------------------------- wp · 2021-04-17 12:26 There is a charteditor demo in folder components/tachart/demo/charteditor of the trunk TAChart installation; it excessively uses the new chart tools. https://wiki.lazarus.freepascal.org/TAChart_Demos#charteditordemo When chart tools do not work as expected the problem is usally that the TChartToolset component is not linked to the Tools property of the chart. ---------------------------------------------------------------------- AL · 2021-04-17 15:48 Do not forget to set the "SHIFT" property for the Tool.   For a regular mouse click set it to left. ---------------------------------------------------------------------- Muso · 2021-04-17 17:32 Quote from: wp on April 17, 2021, 02:26:32 pmWhen chart tools do not work as expected the problem is usally that the TChartToolset component is not linked to the Tools property of the chart. many thanks! However, this was not the problem, I found now out that since I also have a ZoomDragTool set to shift state "ssLeft" AND my legend is inside the axis, the ZoomDragTool got the clicks. So I now simply changed the order in the TChartToolset and now everything works. Besides this, the LegendClick tool is amazing!