[ { "id": "974263be.d8d2c", "type": "tab", "label": "Strażnik Mocy", "disabled": false, "info": "" }, { "id": "7da97b4.a468784", "type": "function", "z": "974263be.d8d2c", "name": "Chart Preparator P+ plotly.js Online", "func": "var maxSM = 800;\nif (context.global.get(\"maxSM\") !== undefined)\n{\n maxSM = context.global.get(\"maxSM\");\n}\nvar multip = 1;\n\nif (context.global.get(\"multip\") !== undefined)\n{\n multip = context.global.get(\"multip\");\n}\n\nif (context.global.get(\"dataSetGlobal\") !== undefined)\n{\n dataSetGlobal = context.global.get(\"dataSetGlobal\");\n}\n\nif (!dataSet) {\n var dataSet = [];\n}\nif (!dataSetGlobal) {\n var dataSetGlobal = [];\n}\n\nvar dataSeries1 = {};\nvar dataSeries2 = {};\nvar dataSeries3 = {};\nvar dataSeries4 = {};\nvar dataSeries5 = {};\n\n var tempDatax = [];\n var tempDatay = [];\n var tempDatax2 = [];\n var tempDatay2 = [];\n var tempDatax3 = [];\n var tempDatay3 = [];\n var tempDatax4 = [];\n var tempDatay4 = [];\n var tempDatax5 = [];\n var tempDatay5 = []; \n\n tempDatax[0] = msg.payload.data[0].date;\n tempDatay[0] = msg.payload.data[0].data.energy.PP * multip;\n tempDatax2[0] = msg.payload.data[0].date;\n tempDatay2[0] = msg.payload.data[0].data.energy.GrowingPower * multip;\n tempDatax3[0] = msg.payload.data[0].date;\n tempDatay3[0] = msg.payload.data[0].data.energy.PredictedPower * multip;\n tempDatax4[0] = msg.payload.data[0].date;\n tempDatay4[0] = msg.payload.data[0].data.energy.PP_L3 * multip;\n tempDatax5[0] = msg.payload.data[0].date;\n tempDatay5[0] = maxSM; \n\ndataSeries1.x = tempDatax;\ndataSeries1.y = tempDatay;\ndataSeries1.type = 'scatter';\ndataSeries1.name = 'P+ SUM';\ndataSeries1.mode = 'lines';\ndataSeries2.x = tempDatax2;\ndataSeries2.y = tempDatay2;\ndataSeries2.type = 'bar';\ndataSeries2.name = 'Moc narastająca';\ndataSeries2.opacity = 1;\ndataSeries2.marker = {color: 'rgba(22, 180, 22, 1)'};\ndataSeries3.x = tempDatax3;\ndataSeries3.y = tempDatay3;\ndataSeries3.type = 'scatter';\ndataSeries3.mode = 'lines';\ndataSeries3.name = 'Prognoza';\ndataSeries4.x = tempDatax4;\ndataSeries4.y = tempDatay4;\ndataSeries4.type = 'scatter';\ndataSeries4.name = 'P+ L3';\ndataSeries4.mode = 'lines';\ndataSeries5.x = tempDatax5;\ndataSeries5.y = tempDatay5;\ndataSeries5.type = 'scatter';\ndataSeries5.name = 'Moc zamówiona';\ndataSeries5.line = {color: 'rgb(255, 255, 0)', width: 3};\ndataSeries5.mode = 'lines';\n\ndataSet.push(dataSeries1, dataSeries2);\n\nmsg.payload=dataSet;\nmsg.prognozax = dataSeries3.x[0];\nmsg.prognozay = dataSeries3.y[0];\nmsg.maxSM = maxSM;\n\nreturn msg;", "outputs": 1, "noerr": 0, "x": 460, "y": 60, "wires": [ [ "25300060.9c1b4" ] ] }, { "id": "25300060.9c1b4", "type": "ui_template", "z": "974263be.d8d2c", "group": "3fc58583.6ceb4a", "name": "Straznik mocy plotly.js", "order": 1, "width": "13", "height": "10", "format": "\n