To plot the history you would store the output in a flow var, then when new data arrives append it to the stored data, You could then slice the array to limit it to 1000 data points about 10 mins. Any more and you would be displaying more than screen resolution would allow, and overload the dashboard if you had more charts.
e.g.
[{"id":"dee773df779934c2","type":"inject","z":"452103ea51141731","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"60","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":130,"y":1060,"wires":[["79212623d58dae8f"]]},{"id":"79212623d58dae8f","type":"function","z":"452103ea51141731","name":"dummy data","func":"msg.payload=[];\nfor(let i = 0 ; i<100; i++){\n msg.payload.push(Math.round(Math.random()*100)/100-0.5);\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":330,"y":1040,"wires":[["71a48add363bea05"]]},{"id":"71a48add363bea05","type":"function","z":"452103ea51141731","name":"function 15","func":"let timestamp = new Date().valueOf() - 60000;\nlet predata = msg.payload;\nlet data = flow.get(\"chart_data\") || [];\n\npredata.forEach((element, index) => {\n data.push({x: timestamp + (600 * index), y: element} )\n})\nmsg.payload=[\n {\n series: [\"a\"],\n data: [data.slice(-1000)],\n labels: []\n }\n]\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":510,"y":1040,"wires":[["ac405c71d633ea19"]]},{"id":"ac405c71d633ea19","type":"ui_chart","z":"452103ea51141731","name":"","group":"2d4fe667.28f8ba","order":16,"width":0,"height":0,"label":"chart","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"-1","ymax":"1","removeOlder":"10","removeOlderPoints":"1000","removeOlderUnit":"60","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"className":"","x":650,"y":1040,"wires":[["bc7d8720076fee1c"]]},{"id":"bc7d8720076fee1c","type":"change","z":"452103ea51141731","name":"","rules":[{"t":"set","p":"chart_data","pt":"flow","to":"payload[0].data[0]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":830,"y":1040,"wires":[["c58ebb5a56f70f5b"]]},{"id":"c58ebb5a56f70f5b","type":"debug","z":"452103ea51141731","name":"debug 99","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":680,"y":980,"wires":[]},{"id":"2d4fe667.28f8ba","type":"ui_group","name":"demo","tab":"1caa8458.b17814","order":2,"disp":true,"width":"12","collapse":false},{"id":"1caa8458.b17814","type":"ui_tab","name":"Demo","icon":"dashboard","order":1,"disabled":false,"hidden":false}]