Peak detection in TAChart ? lazarus / 55-TAChart ---------------------------------------------------------------------- AL · 2019-11-14 18:23 Is there a way to detect peaks with TAChart in a TlineSeries? Thanks, Al ---------------------------------------------------------------------- Thaddy · 2019-11-14 18:31 You should not misuse the TaChart for that:TaChart is the presentation layer, not the compute layer.  You should detect peaks in the data before you display it. And that is a simple max run. ---------------------------------------------------------------------- wp · 2019-11-14 18:56 No automatic peak detection, I agree with Thaddy. There is a manual interactive peak detection with some limitations, though. Look at example "distancedemo" in folder "demo/distance" of your Lazarus installation, page "Fit": Select "Find peak" in the "Measure" box, then, holding the RIGHT mouse button down, drag from the somewhere below the peak to somewhere after the peak. The routine will fit a parabola to the data in the range spanned by the mouse range and display y and y value of the parabola's extremum. Note, however, that this does not separate overlapping peaks or subtract a varying background. Therefore, the peak producing the shoulder near x=6 is reported at an incorrect value (7.75, but from the construction of the curve it should be at 2*pi = 6.28; finding the correct value requires more effort). ---------------------------------------------------------------------- AL · 2019-11-14 19:51 WP:  Thanks for pointing that demo.  This is interesting, I will study that. Quote from: Thaddy on November 14, 2019, 07:31:21 pmYou should not misuse the TaChart for that:TaChart is the presentation layer, not the compute layer.  You should detect peaks in the data before you display it. And that is a simple max run. This is what I tought, but I wanted to ask, just in case.  This package is so good, you never know. At the moment, this is what I do, looking for max ( up to 3 peaks), but I need something a little fancier. Thank you both for your quick answers