Trying to chart high/low temp

Try this, it's a further development of your version.

[{"id":"1cab0dd86162fd95","type":"function","z":"a987d3a0e0ae852c","name":"function 1","func":"// Look in On Start\nlet old = context.get('Day')\nlet day = new Date().getDay()\n\nif (old != day) {\n    context.set('Day', day)\n    context.set(\"Min\", 100)\n    context.set(\"Max\", -100)\n}\n\nmsg.min = context.get('Min')\nmsg.max = context.get('Max')\n\nconst Tmp = msg.payload\nmsg.topic = 'Tmp'\nnode.send(msg)\n\nif (Tmp < msg.min)  {\n    context.set('Min', Tmp)\n    msg.min = Tmp\n    msg.topic = 'Min'\n    node.send([null, msg])\n}\n\n\n\nif (Tmp > msg.max) {\n    msg.max = Tmp\n    msg.topic = 'Max'\n    node.send([null, msg])\n    context.set('Max', Tmp)\n}\n","outputs":2,"timeout":0,"noerr":0,"initialize":"//if (context.get(\"Day\") === undefined)\n    context.set(\"Day\", -1);\n    context.set(\"Min\", 100)\n    context.set(\"Max\", -100)\n    ","finalize":"","libs":[],"x":300,"y":1000,"wires":[["a7ecd84ed7c81fe8"],["f03eada3305694ef","6769276dd1369687","0c4ade7db34f8987","3155dd6e832f91d2","96f552e00a05af0a","0b63aaca4c03436a"]]},{"id":"b079c63558100c2d","type":"mqtt in","z":"a987d3a0e0ae852c","name":"Temperature","topic":"Outside/temperature","qos":"2","datatype":"auto-detect","broker":"b8758158381423f0","nl":false,"rap":true,"rh":0,"inputs":0,"x":130,"y":1000,"wires":[["1cab0dd86162fd95"]]},{"id":"a7ecd84ed7c81fe8","type":"debug","z":"a987d3a0e0ae852c","name":"tmp","active":false,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload","statusType":"auto","x":470,"y":920,"wires":[]},{"id":"f03eada3305694ef","type":"ui_text","z":"a987d3a0e0ae852c","group":"b5f7f90a2f77ea3d","order":2,"width":0,"height":0,"name":"","label":"Today's Min","format":"{{msg.min}}","layout":"row-spread","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":490,"y":960,"wires":[]},{"id":"6769276dd1369687","type":"bar-chart-data2","z":"a987d3a0e0ae852c","name":"bar-chart-data2","x_interval":"days","x_size":24,"unit":"","precision":2,"is_meter_reading":"False","agg_by":"min","x":500,"y":1000,"wires":[["42d05518f43a7dec"]]},{"id":"0c4ade7db34f8987","type":"debug","z":"a987d3a0e0ae852c","name":"min","active":false,"tosidebar":true,"console":false,"tostatus":true,"complete":"min","targetType":"msg","statusVal":"payload","statusType":"auto","x":670,"y":980,"wires":[]},{"id":"3155dd6e832f91d2","type":"ui_text","z":"a987d3a0e0ae852c","group":"b5f7f90a2f77ea3d","order":1,"width":0,"height":0,"name":"","label":"Today's Max","format":"{{msg.max}}","layout":"row-spread","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":490,"y":1040,"wires":[]},{"id":"96f552e00a05af0a","type":"bar-chart-data2","z":"a987d3a0e0ae852c","name":"bar-chart-data2","x_interval":"days","x_size":24,"unit":"","precision":2,"is_meter_reading":"False","agg_by":"max","x":500,"y":1080,"wires":[["42d05518f43a7dec"]]},{"id":"0b63aaca4c03436a","type":"debug","z":"a987d3a0e0ae852c","name":"max","active":false,"tosidebar":true,"console":false,"tostatus":true,"complete":"max","targetType":"msg","statusVal":"payload","statusType":"auto","x":670,"y":1100,"wires":[]},{"id":"42d05518f43a7dec","type":"ui_chart","z":"a987d3a0e0ae852c","name":"","group":"b5f7f90a2f77ea3d","order":3,"width":"18","height":"4","label":"Chart","chartType":"bar","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"className":"","x":710,"y":1040,"wires":[[]]},{"id":"b8758158381423f0","type":"mqtt-broker","name":"Local Broker","broker":"localhost","port":1883,"clientid":"","autoConnect":true,"usetls":false,"protocolVersion":4,"keepalive":60,"cleansession":true,"autoUnsubscribe":true,"birthTopic":"","birthQos":"0","birthRetain":"false","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closeRetain":"false","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willRetain":"false","willPayload":"","willMsg":{},"userProps":"","sessionExpiry":""},{"id":"b5f7f90a2f77ea3d","type":"ui_group","name":"Group 1","tab":"eaa84631f407bcd4","order":1,"disp":true,"width":"18","collapse":false,"className":""},{"id":"eaa84631f407bcd4","type":"ui_tab","name":"daily temperatures","icon":"dashboard","order":5,"disabled":false,"hidden":false},{"id":"2d18058014e53e6e","type":"global-config","env":[],"modules":{"node-red-dashboard":"3.6.6","node-red-contrib-dashboard-bar-chart-data2":"0.9.101"}}]

1 Like

ill give it a try thanks
martin

hi the max min seems to be working great (max 11.8 min 6.2) but the chart minimum is 9.6 , any ideas , thanks
martin

I can see the problem. It must be in the Chart node.
Since it is from dashboard 1, it is unlikely to be fixed.

I'm interested.

Mind sharing what you think is the problem?