Hi;
How can I show two different data in one graph. Thank you in advance for your help
[{"id":"be4ba5fc5add8b7d","type":"tab","label":"Flow 17","disabled":false,"info":"","env":[]},{"id":"c18eb38d29190239","type":"mysql","z":"be4ba5fc5add8b7d","mydb":"496de392.ca2cbc","name":"","x":1070,"y":480,"wires":[["1f5876dfd3a7be0e"]]},{"id":"d26f66511c6d7ddb","type":"ui_chart","z":"be4ba5fc5add8b7d","name":"","group":"2f70fd7d67ed6a37","order":11,"width":30,"height":5,"label":"","chartType":"line","legend":"true","xformat":"Y-M-D / HH:mm","interpolate":"linear","nodata":"","dot":true,"ymin":"","ymax":"","removeOlder":"24","removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"useUTC":true,"colors":["#1f96ea","#0bf933","#f97d10","#2ca02c","#37f20d","#fb0909","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"className":"","x":1390,"y":480,"wires":[["6a057478727c289e"]]},{"id":"1f5876dfd3a7be0e","type":"function","z":"be4ba5fc5add8b7d","name":"","func":"var sec_sens1 = flow.get( \"secim1\" ) || false ;\nvar sec_sens = flow.get( \"secim\" ) || false ; \n\nvar data1 = [];\nvar data = [];\nvar Zaman = [];\nvar Zaman1 = [];\n\nmsg.payload.forEach(function(value) {\n \n data.push( value[ sec_sens1 ] ); // temp or hum choice \n Zaman1.push( value['Zaman'] ); // time data /* Exp: Zaman = Time */\n \n});\n\n\nmsg.payload = [{\n \n series: [ \"\"+ sec_sens + \" \" + sec_sens1 +\" verisi\"],\n data: [ data ],\n labels: Zaman1\n\n}];\n\nreturn msg;\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1240,"y":480,"wires":[["d26f66511c6d7ddb"]]},{"id":"f2010022525e821e","type":"ui_button","z":"be4ba5fc5add8b7d","name":"","group":"2f70fd7d67ed6a37","order":5,"width":3,"height":2,"passthru":false,"label":"Get","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"","payloadType":"date","topic":"query","topicType":"str","x":530,"y":740,"wires":[["7b156ef5d6e1546b","61bc08b1b3802736"]]},{"id":"7b156ef5d6e1546b","type":"function","z":"be4ba5fc5add8b7d","name":"sensor_1 get_data","func":"\n\nif( msg.topic == \"download\" || msg.topic == \"query\" ){\n \n \n\n var sec_sens = flow.get( \"secim\" )|| false ; // sensor choice\n \n var start_Date = flow.get( \"startDate\" ) || false ;\n var start_Time = flow.get( \"bas_saat\" ) || false ;\n \n var end_Date = flow.get( \"endDate\" ) || false ;\n var end_Time = flow.get(\"bitis_saat\") || false ;\n\n\n // check if date range is correct\n if ( start_Date && end_Date && ( new Date(end_Date) >= new Date(start_Date) ) ) \n {\n msg.topic = \"select * from \" + sec_sens + \" where Zaman between '\" + start_Date + \" \" + start_Time + \"' and '\" + end_Date +\" \" + end_Time + \"'\";\n return msg; /* Exp: Zaman = Time */\n } else {\n node.warn(\"end date is before start date. or context not set\");\n }\n\n \n\n}\n\n\n\n\n\n\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":870,"y":480,"wires":[["c18eb38d29190239"]]},{"id":"f014b99f92495f10","type":"ui_date_picker","z":"be4ba5fc5add8b7d","name":"","label":"Start Date","group":"2f70fd7d67ed6a37","order":1,"width":7,"height":1,"passthru":false,"topic":"payload","topicType":"msg","className":"","x":220,"y":440,"wires":[["199811dd92bf33db"]]},{"id":"199811dd92bf33db","type":"change","z":"be4ba5fc5add8b7d","name":"","rules":[{"t":"set","p":"startDate","pt":"flow","to":"$moment($$.payload).format(\"YYYY-MM-DD\")","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":470,"y":440,"wires":[["7b156ef5d6e1546b","61bc08b1b3802736"]]},{"id":"7c1a0501448b83e4","type":"change","z":"be4ba5fc5add8b7d","name":"","rules":[{"t":"set","p":"endDate","pt":"flow","to":"$moment($$.payload).format(\"YYYY-MM-DD\")","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":480,"y":540,"wires":[["7b156ef5d6e1546b","61bc08b1b3802736"]]},{"id":"e41c2bbba7726930","type":"ui_date_picker","z":"be4ba5fc5add8b7d","name":"","label":"End Date","group":"2f70fd7d67ed6a37","order":6,"width":7,"height":1,"passthru":false,"topic":"payload","topicType":"msg","className":"","x":220,"y":540,"wires":[["7c1a0501448b83e4"]]},{"id":"b9b35ffd865f76f8","type":"ui_dropdown","z":"be4ba5fc5add8b7d","name":"","label":"Sensor choice","tooltip":"","place":"Select option","group":"2f70fd7d67ed6a37","order":3,"width":7,"height":1,"passthru":true,"multiple":false,"options":[{"label":"1.Sensor","value":"sensor_1","type":"str"},{"label":"2.Sensor ","value":"sensor_2","type":"str"}],"payload":"","topic":"topic","topicType":"msg","className":"","x":240,"y":340,"wires":[["e297fe905c4929a0"]]},{"id":"e297fe905c4929a0","type":"change","z":"be4ba5fc5add8b7d","name":"","rules":[{"t":"set","p":"secim","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":480,"y":340,"wires":[["7b156ef5d6e1546b"]]},{"id":"4415581852290f1f","type":"ui_dropdown","z":"be4ba5fc5add8b7d","name":"","label":"Temp / hum choice","tooltip":"","place":"Select option","group":"2f70fd7d67ed6a37","order":8,"width":7,"height":1,"passthru":true,"multiple":false,"options":[{"label":"Sicaklik","value":"Sicaklik","type":"str"},{"label":"Nem","value":"Nem","type":"str"}],"payload":"","topic":"topic","topicType":"msg","className":"","x":250,"y":280,"wires":[["81f45eea70528973"]]},{"id":"81f45eea70528973","type":"change","z":"be4ba5fc5add8b7d","name":"","rules":[{"t":"set","p":"secim1","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":480,"y":280,"wires":[["7b156ef5d6e1546b"]]},{"id":"c2f16d5d5d8843ce","type":"ui_dropdown","z":"be4ba5fc5add8b7d","name":"","label":"Temp / Hum choice","tooltip":"","place":"Select option","group":"2f70fd7d67ed6a37","order":9,"width":7,"height":1,"passthru":true,"multiple":false,"options":[{"label":"Sicaklik","value":"Sicaklik","type":"str"},{"label":"Nem","value":"Nem","type":"str"}],"payload":"","topic":"topic","topicType":"msg","className":"","x":250,"y":140,"wires":[["0b13e600d79e6f17"]]},{"id":"b7e9e02e8f6fc68a","type":"ui_dropdown","z":"be4ba5fc5add8b7d","name":"","label":"Sensor choice","tooltip":"","place":"Select option","group":"2f70fd7d67ed6a37","order":4,"width":7,"height":1,"passthru":true,"multiple":false,"options":[{"label":"1.Sensor","value":"sensor_1","type":"str"},{"label":"2.Sensor","value":"sensor_2","type":"str"}],"payload":"","topic":"topic","topicType":"msg","className":"","x":240,"y":200,"wires":[["edd796751e8ed69b"]]},{"id":"0b13e600d79e6f17","type":"change","z":"be4ba5fc5add8b7d","name":"","rules":[{"t":"set","p":"k_secim2","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":470,"y":140,"wires":[["7b156ef5d6e1546b"]]},{"id":"edd796751e8ed69b","type":"change","z":"be4ba5fc5add8b7d","name":"","rules":[{"t":"set","p":"k_secim3","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":470,"y":200,"wires":[["61bc08b1b3802736"]]},{"id":"6a057478727c289e","type":"debug","z":"be4ba5fc5add8b7d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1570,"y":480,"wires":[]},{"id":"b640fe2bd4c2d13a","type":"function","z":"be4ba5fc5add8b7d","name":"","func":"var sec_sens2 = flow.get( \"k_secim2\" ) || false ;\nvar sec_sens3 = flow.get( \"k_secim3\" ) || false;\n\n\nvar data1 = [];\nvar data = [];\nvar Zaman = [];\nvar Zaman1 = [];\nmsg.payload.forEach(function(value) {\n\n data1.push(value[sec_sens2] ); // temp or hum choice\n Zaman1.push(value[ 'Zaman' ] ); // time data /* Exp: Zaman = Time */\n \n \n});\n\n\nmsg.payload = [{\n \n series: [ \"\"+ sec_sens3 + \" \" + sec_sens2 +\" verisi\" ],\n data: [ data1 ],\n labels: Zaman1\n\n}];\n\nreturn msg;\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1240,"y":720,"wires":[["57ec96c3bf52e191"]]},{"id":"61bc08b1b3802736","type":"function","z":"be4ba5fc5add8b7d","name":"sensor_2 get_data","func":"\n if(msg.topic == \"query\") {\n \n var start_Date = flow.get( \"startDate\" ) || false; \n var end_Date = flow.get( \"endDate\" ) || false;\n var start_Time = flow.get( \"bas_saat\" ) || false;\n var end_Time = flow.get( \"bitis_saat\") || false; \n var sec_sens3 = flow.get( \"k_secim3\" ) || false; // sensor choice\n\n\n\n // check if date range is correct\n if ( start_Date && end_Date && ( new Date(end_Date) >= new Date(start_Date) ) ) \n {\n msg.topic = \"select * from \" + sec_sens3 + \" where Zaman between '\" + start_Date + \" \" + start_Time + \"' and '\" + end_Date +\" \" + end_Time + \"'\";\n return msg; /* Exp: Zaman = Time */\n } else {\n node.warn(\"end date is before start date. or context not set\"); \n \n \n \n }\n\n }","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":870,"y":720,"wires":[["55f25ef358350b28"]]},{"id":"55f25ef358350b28","type":"mysql","z":"be4ba5fc5add8b7d","mydb":"496de392.ca2cbc","name":"","x":1070,"y":720,"wires":[["b640fe2bd4c2d13a"]]},{"id":"57ec96c3bf52e191","type":"ui_chart","z":"be4ba5fc5add8b7d","name":"","group":"2f70fd7d67ed6a37","order":12,"width":30,"height":5,"label":"","chartType":"line","legend":"true","xformat":"Y-M-D / HH:mm","interpolate":"linear","nodata":"","dot":true,"ymin":"","ymax":"","removeOlder":"24","removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"useUTC":true,"colors":["#fbff05","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"className":"","x":1390,"y":720,"wires":[["c669254cf5a64276"]]},{"id":"b11dbde85f82f908","type":"ui_text_input","z":"be4ba5fc5add8b7d","name":"","label":"Start Hours","tooltip":"","group":"2f70fd7d67ed6a37","order":2,"width":6,"height":1,"passthru":true,"mode":"time","delay":"0","topic":"bas_saat","sendOnBlur":true,"className":"","topicType":"msg","x":230,"y":480,"wires":[["2ef44bf195d4c133"]]},{"id":"789f926592e6a2d7","type":"ui_text_input","z":"be4ba5fc5add8b7d","name":"","label":"End Hours","tooltip":"","group":"2f70fd7d67ed6a37","order":7,"width":6,"height":1,"passthru":true,"mode":"time","delay":"0","topic":"bitis_saat","sendOnBlur":true,"className":"","topicType":"msg","x":230,"y":600,"wires":[["333826dca1b5151d"]]},{"id":"2ef44bf195d4c133","type":"change","z":"be4ba5fc5add8b7d","name":"","rules":[{"t":"set","p":"bas_saat","pt":"flow","to":"$moment($$.payload).tz(\"UTC\").format(\"HH:mm:ss\")","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":470,"y":480,"wires":[["7b156ef5d6e1546b","61bc08b1b3802736"]]},{"id":"333826dca1b5151d","type":"change","z":"be4ba5fc5add8b7d","name":"","rules":[{"t":"set","p":"bitis_saat","pt":"flow","to":"$moment($$.payload).tz(\"UTC\").format(\"HH:mm:ss\")","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":470,"y":600,"wires":[["7b156ef5d6e1546b","61bc08b1b3802736"]]},{"id":"c669254cf5a64276","type":"debug","z":"be4ba5fc5add8b7d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1570,"y":720,"wires":[]},{"id":"496de392.ca2cbc","type":"MySQLdatabase","name":"","host":"127.0.0.1","port":"3306","db":"dnm","tz":"+3:00","charset":"UTF8"},{"id":"2f70fd7d67ed6a37","type":"ui_group","name":"Database veri çekme","tab":"22aa4264a26a4cce","order":1,"disp":true,"width":30,"collapse":false,"className":""},{"id":"22aa4264a26a4cce","type":"ui_tab","name":"Sensor 3","icon":"dashboard","order":3,"disabled":false,"hidden":false}]