Thanks, I will try the lines proposal. The problem that the graph was not displayed was the browser (Firefox): when I selected a day where I had no data from the graph disappered. Then when I choose a day with data I did not get my graph. When I then pressed CTRL-F5 the graph reappeared. Something to do with caching I presume.
This is what I'm working on:
[{"id":"4f1b7cf7b9b34133","type":"ui_date_picker","z":"3759b07b.f88938","name":"datum_mwm","label":"grafiek op","group":"f2a17a62170c2e69","order":2,"width":0,"height":0,"passthru":false,"topic":"","topicType":"str","className":"","x":90,"y":1880,"wires":[["24d6003533fb19ea","a41cf2f784aed7a7"]]},{"id":"24d6003533fb19ea","type":"function","z":"3759b07b.f88938","name":"make whole day","func":"if ( !msg.timestamp ) msg.timestamp = Math.round(+new Date());\n\nvar dt = new Date(msg.payload);\nvar Y = dt.getFullYear().toString();\nvar M = (dt.getMonth() + 1).toString();\nif((dt.getMonth() + 1)<=9){M='0'+M}\nvar D = dt.getDate().toString();\nif(dt.getDate()<=9){D='0'+D}\nvar H = dt.getHours().toString();\nif(dt.getHours()<=9){H='0'+H}\nvar m = dt.getMinutes().toString();\nif(dt.getMinutes()<=9){m='0'+m}\n//var S = dt.getMilliseconds().toString();\nmsg.payload = Y+'-'+M+'-'+D;\nmsg.datum = Y+'-'+M+'-'+D;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":280,"y":1880,"wires":[["522bacc6f08d0343"]]},{"id":"a41cf2f784aed7a7","type":"debug","z":"3759b07b.f88938","name":"datum","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":260,"y":1820,"wires":[]},{"id":"db5f7aab9d038ab7","type":"inject","z":"3759b07b.f88938","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"1667347200000","payloadType":"num","x":110,"y":1960,"wires":[["24d6003533fb19ea","a41cf2f784aed7a7"]]},{"id":"522bacc6f08d0343","type":"template","z":"3759b07b.f88938","name":"format query","field":"topic","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"SELECT UNIX_TIMESTAMP(d_ts), d_waarde, d_max, d_min\nFROM data\nWHERE d_ts >= \"{{payload}}:00:00:00\"\n AND d_ts <= \"{{payload}}:23:59:59\"\nORDER BY d_ts ASC;","output":"str","x":470,"y":1880,"wires":[["cd71db604bcef6f2"]]},{"id":"cd71db604bcef6f2","type":"mysql","z":"3759b07b.f88938","mydb":"ed59d6734411cfdd","name":"MariaDB","x":620,"y":1880,"wires":[["9f74654ab95b7932"]]},{"id":"9f74654ab95b7932","type":"change","z":"3759b07b.f88938","name":"Format data WK","rules":[{"t":"set","p":"payload","pt":"msg","to":"(\t $series := [\t { \"field1\": \"d_waarde\", \"field2\": \"d_max\", \"field3\": \"d_min\", \"label\": \"TuinTemp\" }\t ];\t $xaxis := \"UNIX_TIMESTAMP(d_ts)\";\t [\t {\t \"series\": [\"Huidig\",\"Max\",\"Min\"],\t \"labels\": [$series.label],\t \"data\": $series.[[\t (\t $yaxis := $.field1;\t $$.payload.{\t \"x\": $lookup($, $xaxis)*1000,\t \"y\": $number($lookup($, $yaxis))\t }\t )\t ],[\t (\t $yaxis := $.field2;\t $$.payload.{\t \"x\": $lookup($, $xaxis)*1000,\t \"y\": $number($lookup($, $yaxis))\t }\t )\t ],[\t (\t $yaxis := $.field3;\t $$.payload.{\t \"x\": $lookup($, $xaxis)*1000,\t \"y\": $number($lookup($, $yaxis))\t }\t )\t ]]\t }\t ]\t)","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":780,"y":1880,"wires":[["ceec58959c7461f2","7fed709d69e8509e"]]},{"id":"ceec58959c7461f2","type":"ui_chart","z":"3759b07b.f88938","name":"","group":"f2a17a62170c2e69","order":3,"width":0,"height":0,"label":"TuinTemperatuurHistorie","chartType":"line","legend":"true","xformat":"HH:mm","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":"24","removeOlderPoints":"","removeOlderUnit":"604800","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"className":"","x":1010,"y":1880,"wires":[["bbb23d92844e8f9f"]]},{"id":"7fed709d69e8509e","type":"debug","z":"3759b07b.f88938","name":"data","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":960,"y":1940,"wires":[]},{"id":"bbb23d92844e8f9f","type":"debug","z":"3759b07b.f88938","name":"message","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1070,"y":2040,"wires":[]},{"id":"f2a17a62170c2e69","type":"ui_group","name":"MinWaardeMax","tab":"bf4b8d34.813ae8","order":4,"disp":true,"width":"6","collapse":false,"className":""},{"id":"ed59d6734411cfdd","type":"MySQLdatabase","name":"","host":"192.168.17.67","port":"3306","db":"huismanager","tz":"","charset":"UTF8"},{"id":"bf4b8d34.813ae8","type":"ui_tab","name":"Huismanager","icon":"dashboard","order":1,"disabled":false,"hidden":false}]