Real time chart lazarus / 55-TAChart ---------------------------------------------------------------------- Johan Holstein · 2021-01-22 16:45 Hi group, I search on the forum for a realtime chart with on X axis the time in hh:mm but without luck,  this is for my temperature recorder. I like to use one channel. Can someone help with an example? Best regards, Johan ---------------------------------------------------------------------- MarkMLl · 2021-01-22 17:10 Have you investigated https://wiki.freepascal.org/TAChart ? I've used it a little, and my recollection is that it's OK if your sample times are evenly-spaced but rather less so if they're erratic (e.g. you log the precise instants something changes but nothing between). MarkMLl ---------------------------------------------------------------------- wp · 2021-01-22 17:36 Please search the forum for "TAChart" and myself as a poster. There are lots of posts about creating time-series charts. ---------------------------------------------------------------------- Johan Holstein · 2021-01-22 19:53 Hi WP,  Sure but not a good example can you point me in a good direction? Thanks, Johan ---------------------------------------------------------------------- wp · 2021-01-22 21:15 It took me 20 seconds to find this one: https://forum.lazarus.freepasc al.org/index.php/topic,49251.msg356477.html#msg356477 ---------------------------------------------------------------------- Johan Holstein · 2021-01-26 19:56 Hi WP, group, This is a bad example and not what I need .... I need a X time axis in hh:mm but the example is far from that. Is there someone who can help me with that or point to a example.... Thanks in advance, Best regards, Johan ---------------------------------------------------------------------- wp · 2021-01-26 21:24 It is a good example. If you had not given up immediately after running the sample and had studied the code you would have seen that time and value are passed to the series in the order x=value and y = time (there's even a comment in the code pointing to this). So you only have to exchange the order of value and time in the AddXY method of the series: 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 procedure TForm1.AddDataPoint(t: TDateTime; value: Double);begin//   Chart1LineSeries1.AddXY(Value, t);   // value on x, time on y axis!   Chart1LineSeries1.AddXY(t, Value);end; The remaining change is less straightforward. There is a TDataTimeIntervalChartSource which is responsible for formatting floating point numbers as date/time. The example had the time axis pointing upward, therefore the DateTimeIntervalChartSource is hooked to the Marks.Source property of the left axis. In order to format the x axis as date/time remove the DateTimeIntervalChartSource from the left axis and attach it to the bottom axis. And set Chart.BottomAxis.Marks.Style to smsLabel (to display the time labels) and reset Chart.LeftAxis.Marks.Style to smsValue (to restore the original values on the y axis). ---------------------------------------------------------------------- MarkMLl · 2021-01-29 14:45 Quote from: j.g.holstein@rug.nl on January 26, 2021, 08:56:20 pmThis is a bad example and not what I need .... I need a X time axis in hh:mm but the example is far from that. Is there someone who can help me with that or point to a example.... I've just been looking at https://forum.lazarus.freepascal.org/index.p hp?action=dlattach;topic=49251.0;attach=36220 (data_arriving.zip) which I believe was the example cited and found it perfectly adequate. However (@j.g.holstein@rug.nl, this is for you): I think the important point is that this sort of thing is not going to be very much use if you simply type the files, since you don't get to see the hints that the IDE is trying to give you about the design-time configuration of the various components. You /did/ take the trouble to open the files using the IDE didn't you? What did you find difficult to follow? Responding "this is a bad example ... is there someone who can help" when somebody /is/ trying to help you isn't going to make you any friends. MarkMLl ---------------------------------------------------------------------- trev · 2021-01-29 22:24 Quote from: j.g.holstein@rug.nl on January 26, 2021, 08:56:20 pmThis is a bad example and not what I need Of course it's not precisely what you need - it is, after all, an example which demonstrates the principle. You will need to adapt it to your own specific requirements. If you are unwilling to do that, then you'll need to find someone else to do it for you and compensate them appropriately.