Forum > TAChart
[Solved] TChart and Date in X Axis
(1/1)
berghem:
Hi all
in my app I collect a lot od data from my temperature probe and I have to put the value in Y axis and I want put the date in X asset.
I collect data every 60 seconds from a lot days (circa 15 days) and I wont put the date one time per day.
I saw TDateTimeIntevalChartSource but doesn't work I use this commad
Myseries.add(value, DatetoStr(Now)
Can you help me?
wp:
--- Quote from: berghem on February 23, 2022, 09:39:07 pm ---I saw TDateTimeIntevalChartSource but doesn't work I use this commad
Myseries.add(value, DatetoStr(Now)
--- End quote ---
MySeries.Add does not store the date/time of the temperature measurement as X (which is taken as the index of the data point). You should use AddXY(x, y, ...) instead:
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---Myseries.AddXY(Now(), Temperature);
In the attachment you find a tested demo project with lots of comments.
berghem:
Thanks work well!
Navigation
[0] Message Index