issue 2: the format of the data sent into the chart node must use 'x' and 'y' so you have to change the SQL query to return 'x' inplace of 'UTC' and 'y' inplace of 'hp' - change the query in the function node to:
var b= " SELECT UTC as 'x', hp as 'y' FROM hvac4 WHERE UTC BETWEEN "+ stday2 +" AND "+ enday2+" "
issue 3: change the flow so the change node is connected to the sql node and the change nodt feeds the chart node directly.
I been searching a lot on internet to create this type of db.
I saw many examples to format sqlite db in that way.
What I'm trying to do is shown on chart some parameter over the time and
the real time parameters are been watching on a dashboard which I've already working.
I'm not software engineer, I'm still learning about JS that the reason I choose Node-red.
So if you have a better alternative to manage db for historical purpose is gonna be very much
appreciated
In the mean time I gonna go on with Paul who is helping me a lot.
He really make me struggle with this stuff and I appreciate it because is the best way to learn .
Kind Regards,
Alex
If you want to look at historical data, zoom in and out and so on then many suggest that using Influxdb with Grafana is a good way to go. With Grafana you will get much better graphical capabilities than you will get trying to do it yourself with the node red dashboard chart, which is designed as a quick and easy way to real time charts. There are influxdb nodes in node-red for easily writing the data to the database, then you use Grafana for viewing them.
With your last suggestion the chart is now working !!!
I'm gonna analyze the changes to comprehend them.
I don't like using something without understanding it and repeating it as a parrot.
Than you very much for your time