The marks are drawn along with the series. Therefore, the marks of the series drawn first may be overwritten by the series drawn later. But the drawing order of the series is determined by their ZPosition.Thanks.
You can even merge this into the OnPointClick handler of the TDatapointMarksClickTool
This is what I already tried, but the users want to see all marks by one view (no need to click to see them). In my example there are marks in the red and the blue series. Therefore changing the z-order does not solve the problem, since some notes will not be properly visible.But there are other tools. The one which does not require a mouse press is the DatapointHintTool. Set its UseDefaultHintText to false to avoid a hint popping up. Then add the Z-reordering code into the OnHint event. This moves the series over which the mouse hovers to the top of the Z stack. Since in your case there are really lots of data points it should be almost impossible to miss a data point. If it is nevertheless, you should add the nptCustom option to the series' ToolTargets. This fires the OnHint event also when the mouse is over the interpolating line.
Therefore I thought that when the series are drawn first and then subsequently the marks, the issue should be solvable. If this is yet possible, this might be nice new feature ;) .This would mean that every series must be painted twice, once with its normal representation as lines, symbols, bars or whatever, and a second time with its labels only. This would double painting time, and charts almost completely covered by data points like in your case would draw even slower.
I gave this a try but get a crash when I try to access the Z-order see attached screenshot.I don't know. Of course I tested the idea, and it is working for my sample project - see attachment (which contains the Z-Order code in both DatapointMarkClick- and DatapointHintTools, i.e. reacts on moving the mouse over the data points/connecting lines and on clicking on the mark labels).
Is this a bug in the tool or do I have to do something special?
I don't know. Of course I tested the idea, and it is working for my sample project
So there is a bug in the description of ZPosition, because it says, that to bring a series to front one should set it to 0.Where is that? I did not find such a statement in https://wiki.lazarus.freepascal.org/TAChart_documentation
Where is that? I did not find such a statement in https://wiki.lazarus.freepascal.org/TAChart_documentation (https://wiki.lazarus.freepascal.org/TAChart_documentation)In the tooltip, see attached.