simple scatter chart - line chart without lines

Sometimes you may just want to plot points rather than lines (or curves) on a chart.

A feature of the lines chart is that we can break the lines by sending a null or false as the payload, so we can break all the points into pieces by using this trick.

The simple way to do this is to use a trigger node to pass though the original message and then also send a boolean false a few milliseconds later.

You will also need to tick the enlarge points option in the line chart so that the points are visible.

[{"id":"45518a88.0a5c34","type":"inject","z":"66742658.e5d518","name":"","topic":"","payload":"","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":150,"y":400,"wires":[["54f0a7ca.c0b728"]]},{"id":"54f0a7ca.c0b728","type":"random","z":"66742658.e5d518","name":"","low":"1","high":"10","inte":"true","property":"payload","x":320,"y":400,"wires":[["49d0f9f1.54e0b8"]]},{"id":"49d0f9f1.54e0b8","type":"trigger","z":"66742658.e5d518","op1":"","op2":"false","op1type":"pay","op2type":"bool","duration":"10","extend":false,"units":"ms","reset":"","bytopic":"all","name":"","x":490,"y":400,"wires":[["2224575e.8f4f38"]]},{"id":"2224575e.8f4f38","type":"ui_chart","z":"66742658.e5d518","name":"","group":"5003631.3bc729c","order":0,"width":0,"height":0,"label":"chart","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":true,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"60","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"x":650,"y":400,"wires":[[],[]]},{"id":"5003631.3bc729c","type":"ui_group","z":"","name":"Default","tab":"44904efc.96d75","disp":true,"width":"6","collapse":false},{"id":"44904efc.96d75","type":"ui_tab","z":"","name":"Home","icon":"dashboard"}]

Flow Info

Created 6 years, 7 months ago
Rating: 4.5 2

Owner

Actions

Rate:

Node Types

Core
  • inject (x1)
  • trigger (x1)
Other
  • random (x1)
  • ui_chart (x1)
  • ui_group (x1)
  • ui_tab (x1)

Tags

  • scatter
  • points
  • chart
Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option