Don't know if most efficient way but smoothing as post-processing can be done
[{"id":"8fc59c20967dec7b","type":"rbe","z":"afcfe6f7a144f0b4","name":"","func":"deadbandEq","gap":"0.5","start":"","inout":"out","septopics":false,"property":"payload.y","topi":"topic","x":240,"y":360,"wires":[["b6aefe5a1d3be161","00b92acddc7f09b1"]]},{"id":"1e23bfae06dabb9a","type":"inject","z":"afcfe6f7a144f0b4","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"test","payloadType":"date","x":140,"y":200,"wires":[["6ad8a978a5fe9a9d"]]},{"id":"6ad8a978a5fe9a9d","type":"function","z":"afcfe6f7a144f0b4","name":"data","func":"let data = []\nfor (let index = 0; index <20; index++) {\n data.push({y:Math.random()*2,x:new Date().getTime()+index*1000})\n \n}\nmsg.payload = data\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":150,"y":240,"wires":[["1e3f0bc130d29a94","2976984496eee764"]]},{"id":"1e3f0bc130d29a94","type":"debug","z":"afcfe6f7a144f0b4","name":"RAW","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":410,"y":240,"wires":[]},{"id":"ee71b5ec3bb79601","type":"debug","z":"afcfe6f7a144f0b4","name":"SMOOTH","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":420,"y":400,"wires":[]},{"id":"2976984496eee764","type":"split","z":"afcfe6f7a144f0b4","name":"","splt":"","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":170,"y":280,"wires":[["99203a7b3115cccd"]]},{"id":"b6aefe5a1d3be161","type":"join","z":"afcfe6f7a144f0b4","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"num","reduceFixup":"","x":270,"y":400,"wires":[["ee71b5ec3bb79601"]]},{"id":"00b92acddc7f09b1","type":"debug","z":"afcfe6f7a144f0b4","name":"FILTER","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":420,"y":360,"wires":[]},{"id":"99203a7b3115cccd","type":"function","z":"afcfe6f7a144f0b4","name":"add complete","func":"if(msg.parts.count - 1 == msg.parts.index){\n msg.complete = true\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":220,"y":320,"wires":[["8fc59c20967dec7b"]]}]