Show Last X samples in Graph lazarus / 55-TAChart ---------------------------------------------------------------------- Bas · 2020-06-19 07:55 In a graph i show realtime data which is coming in at 100Hz so the graph fills up very quickly. Is it possible to show only the last 1000 or 10000 samples with the graph shifting automaticly  ? ---------------------------------------------------------------------- wp · 2020-06-19 08:20 What should happen with the older values? Should they be deleted so that the series contains never more then, say, 1000 points? Or should they still be stored but the visible window should be decreases so that only the last 1000 points are visible although there are more points in the series? In the latter case, should it be possible to scroll back to previous data points, or should there be a need to see all points? ---------------------------------------------------------------------- Bas · 2020-06-19 08:29 Older points can just be disregarded/deleted ---------------------------------------------------------------------- wp · 2020-06-19 08:45 Play with the attached demo. ---------------------------------------------------------------------- Bas · 2020-06-19 10:56 That works fine but due to the moving grid in the backgroud it looks like crap  . Is there a way to switch off the x-axis on the grid in the background ? ---------------------------------------------------------------------- wp · 2020-06-19 11:30 Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Chart1.BottomAxis.grid.Visible := false;    // Hide the x axis gridChart1.BottomAxis.Marks.visible := false;   // Hide the x axis labels and ticks You may also want to keep the x axis at a constant scaling factor to avoid the expansion while the first data points are added. Put this code into the routine which receives the data, in my example in the OnTimer event handler: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i   Chart1.BottomAxis.Range.Max := t;  Chart1.BottomAxis.Range.Min := t - MAX_POINTS * Timer1.Interval/1000;  Chart1.BottomAxis.Range.UseMax := true;  Chart1.BottomAxis.Range.UseMin := true; ---------------------------------------------------------------------- Bas · 2020-06-22 04:14 Thx, works all perfect now