I am having a problem getting the attached flow to work. I am not able to change the demo chart to my format.
The graph I would like to create should look like this excel graph:
by varying the 3 parameters in the calculation node, I want to display the result.
my test flow :
[{"id":"7027f7d3eb635061","type":"tab","label":"chart ploty","disabled":false,"info":"","env":[]},{"id":"5e0d9a67.116c84","type":"ui_template","z":"7027f7d3eb635061","group":"2e16cb22.999174","name":"Load Plotly CDN","order":17,"width":0,"height":0,"format":"<script src=\"https://cdn.plot.ly/plotly-latest.min.js\"></script>\n","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"global","className":"","x":140,"y":80,"wires":[[]]},{"id":"1ca80c56.a7c7d4","type":"comment","z":"7027f7d3eb635061","name":"Plotly example flows","info":"","x":590,"y":220,"wires":[]},{"id":"66e905d7.65d2bc","type":"inject","z":"7027f7d3eb635061","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":"1","topic":"","payload":"","payloadType":"str","x":570,"y":260,"wires":[["324422cd.18882e"]]},{"id":"324422cd.18882e","type":"change","z":"7027f7d3eb635061","name":"UK Temperature - line chart","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"x\":[\"-20\",\"-19\",\"-18\",\"-17\",\"-16\",\"-15\",\"-14\",\"-13\",\"-12\",\"-11\",\"-10\",\"-9\",\"-8\",\"-7\",\"-6\",\"-5\",\"-4\",\"-3\",\"-2\",\"-1\",\"0\"],\"y\":[\"4.6\",\"4.9\",\"9.3\",\"14.2\",\"17.4\",\"19.3\",\"20.8\",\"21.6\",\"19.2\",\"14.3\",\"9.8\",\"6.3\"]}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":770,"y":260,"wires":[[]]},{"id":"2e5762f6.c687fe","type":"ui_template","z":"7027f7d3eb635061","group":"6aa20356.9b59bc","name":"Example 1","order":1,"width":"29","height":"10","format":"<div id=\"example1\"></div>\n<script>\n\n// Initialize chart\nvar data = [{x:[0],y:[0]}];\nvar layout = {\n title:'Awaiting data',\n };\nPlotly.newPlot('example1', data, layout);\n\n// Update data & layout\n(function(scope) {\n scope.$watch('msg', function(msg) {\n if (msg) {\n \n var data = [{\n x:msg.payload.x,\n y:msg.payload.y,\n connectgaps: true\n }];\n\n var layout = {\n title: \"Vorlauftemperatur\",\n titlefont: {\n size: 22,\n },\n autosize: true,\n plot_bgcolor: '#ffffff',\n paper_bgcolor: '#ffffff',\n 'xaxis': {\n title: 'Aussen °C',\n fixedrange: false\n },\n 'yaxis': {\n title: 'Vorlauftemp °C',\n mode: 'lines',\n fixedrange: false\n }\n };\n\n Plotly.newPlot('example1', data, layout, { displayModeBar: false }, { staticPlot: true }, { displaylogo: false },)\n }\n });\n})(scope);\n</script>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","className":"","x":770,"y":580,"wires":[[]]},{"id":"99f06bfbe0452bac","type":"function","z":"7027f7d3eb635061","name":"function 20","func":"let a =[];\nlet c = -20;\n\nfor (let i = 0; i < 41; i++) {\n t = (c).toFixed(0); \n a[i] = '\"' + t + '\"';\n c = c+1;\n}\nmsg.payload = a;\nflow.set('a1',msg.payload);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":550,"y":380,"wires":[["f5163fe0ebd50c94"]]},{"id":"96dc3587e2ad60c1","type":"inject","z":"7027f7d3eb635061","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":400,"y":380,"wires":[["99f06bfbe0452bac"]]},{"id":"f5163fe0ebd50c94","type":"debug","z":"7027f7d3eb635061","name":"debug 20","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":720,"y":380,"wires":[]},{"id":"6d77d94b23983cd8","type":"function","z":"7027f7d3eb635061","name":"Heizkurve VL Soll","func":"//let a = flow.get('va');\n//let b = flow.get('vb');\n//let c = flow.get('vc');\n\nlet a = 20.00;\nlet b = 6.00;\nlet c = 0.70;\n\nlet x = msg.payload;\nif (x > 20.00){\n msg.payload = 0;\n return msg;\n}\nif (x < -20.00){\n msg.payload = -20.00;\n}\nmsg.payload = a + b*Math.sqrt(c*(((20-x)+20)-20));\nmsg.payload = Number.parseFloat(msg.payload.toFixed(2));\nglobal.set('vorlauf_soll',msg.payload);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":570,"y":480,"wires":[["252731e71323cfe8","8f80d3a1c1b4a461"]]},{"id":"ed082435c76aa11e","type":"debug","z":"7027f7d3eb635061","name":"debug 21","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":960,"y":480,"wires":[]},{"id":"f70b3b6b333a3a34","type":"function","z":"7027f7d3eb635061","name":"parseFloat","func":"delete msg.topic;\nmsg.payload = parseFloat(msg.payload);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":390,"y":480,"wires":[["6d77d94b23983cd8"]]},{"id":"e2f39e8a1c3c7fb7","type":"function","z":"7027f7d3eb635061","name":"function 21","func":"let text =[];\nlet c = -20;\n\nfor (let i = 0; i < 41; i++) {\n node.send({payload:c});\n c = c+1;\n}\nnull;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":230,"y":480,"wires":[["f70b3b6b333a3a34"]]},{"id":"3a680589c62875e0","type":"inject","z":"7027f7d3eb635061","name":"","props":[{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"test","x":70,"y":480,"wires":[["e2f39e8a1c3c7fb7"]]},{"id":"252731e71323cfe8","type":"function","z":"7027f7d3eb635061","name":"function 22","func":"let a = context.get('a');\nlet c = context.get('c');\na[c] = '\"' + msg.payload.toFixed(2) + '\"';\nc = c + 1;\ncontext.set('a',a);\ncontext.set('c',c);\nif (c < 21){\n return null;\n}\nmsg.payload = a;\ncontext.set('a',[]);\ncontext.set('c',0);\nflow.set('a2',msg.payload);\nreturn msg;","outputs":1,"noerr":0,"initialize":"// Code added here will be run once\n// whenever the node is started.\ncontext.set('a',[]);\ncontext.set('c',0)","finalize":"","libs":[],"x":770,"y":480,"wires":[["ed082435c76aa11e","a2668c674833b6b1"]]},{"id":"8f80d3a1c1b4a461","type":"debug","z":"7027f7d3eb635061","name":"debug 23","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":760,"y":440,"wires":[]},{"id":"a2668c674833b6b1","type":"function","z":"7027f7d3eb635061","name":"function 23","func":"s1 = '{\"x\":['\ns2 = '\"],\"y\":\"[';\ns3 =']}';\nmsg.payload = s1 + flow.get('a1') + s2 + flow.get('a2') + s3;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":550,"y":600,"wires":[["77fa6b6d81b19356","2e5762f6.c687fe"]]},{"id":"77fa6b6d81b19356","type":"debug","z":"7027f7d3eb635061","name":"debug 24","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":760,"y":620,"wires":[]},{"id":"2e16cb22.999174","type":"ui_group","name":"Chart","tab":"567d8fae.98148","order":1,"disp":false,"width":"10","collapse":false},{"id":"6aa20356.9b59bc","type":"ui_group","name":"examples","tab":"d5ad8b85.f5ba18","order":1,"disp":true,"width":"29","collapse":false,"className":""},{"id":"567d8fae.98148","type":"ui_tab","name":"Realtime Power","icon":"dashboard","order":1,"disabled":false,"hidden":false},{"id":"d5ad8b85.f5ba18","type":"ui_tab","name":"Plotly","icon":"dashboard","disabled":false,"hidden":false}]
I would very much appreciate your help .