Msg.payload: object - Data restructure?

I'm sure its simple but I appear to be running in circles and hoping for a little help please. I have some data that is coming into NR as below: (msg.payload:Object)
image

My understanding is that the payload is the three numerics. As such if I point this at the chart node i end up with junk:

I've tried the split node to get three different messages thinking this would be easier to deal with. So now I'm getting this: (msg:Object)
image

This is my knowledge has failed me. I've tries calling the payload and the key within the chart node but can't seem to get it correct.

How should I restructure the data to pass to the chart node in dashboard 2.0? I've seen a few video and copied these with weather data but all the videos and instruction I come across the data is in a workable format.

Again thanks in advance.

If you paste text data instead of screenshots, someone will knock up a demo flow for you. (use the Copy Value button as explained below)

How to get data:

There’s a great page in the docs (Working with messages : Node-RED) that will explain how to use the debug panel to find the right path to any data item.

Pay particular attention to the part about the buttons that appear under your mouse pointer when you over hover a debug message property in the sidebar.

BX00Cy7yHi

How to post code

In order to make code readable and usable it is necessary to surround your code with three backticks (also known as a left quote or backquote ```)

``` 
   code goes here 
```

You can edit and correct your post by clicking the pencil :pencil2: icon.

See this post for more details - How to share code or flow json

Split the payload with the split node, then check copy key, and enter topic in the msg field.
The chart should then create 3 lines

E1Cid, cheers the split node Object Send a message for each key/value pair was the solution. I've combined that with the pervious information you provided and have a workable end result :slight_smile:

[
    {
        "id": "fb3489af952611f4",
        "type": "split",
        "z": "970da4334e1d65fb",
        "name": "",
        "splt": "\\n",
        "spltType": "str",
        "arraySplt": 1,
        "arraySpltType": "len",
        "stream": false,
        "addname": "topic",
        "x": 230,
        "y": 80,
        "wires": [
            [
                "47becc36adaf7fa5",
                "b485e29c89d58c64"
            ]
        ]
    },
    {
        "id": "47becc36adaf7fa5",
        "type": "change",
        "z": "970da4334e1d65fb",
        "name": "2DP",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "$round($$.payload,2)",
                "tot": "jsonata"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 370,
        "y": 80,
        "wires": [
            [
                "ecba468e1d6ce725",
                "421f245392b7030e"
            ]
        ]
    },
    {
        "id": "ecba468e1d6ce725",
        "type": "switch",
        "z": "970da4334e1d65fb",
        "name": "route on parts.key",
        "property": "parts.key",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "Pontoon_pump_2_water_meter.Scaled_Output",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "Pump_out_line_cub_M_deliverd_this_start",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "Water_level_about_datum_value",
                "vt": "str"
            }
        ],
        "checkall": "false",
        "repair": false,
        "outputs": 3,
        "x": 590,
        "y": 80,
        "wires": [
            [
                "4f6c188b773659a8",
                "b5e4e1f4cdf63a7e",
                "86ec7a14810a4f08"
            ],
            [],
            [
                "7982839ac920dbe7"
            ]
        ]
    },
    {
        "id": "4f6c188b773659a8",
        "type": "ui-gauge",
        "z": "970da4334e1d65fb",
        "name": "",
        "group": "10aa9aade759bfbc",
        "order": 0,
        "width": "2",
        "height": "2",
        "gtype": "gauge-half",
        "gstyle": "rounded",
        "title": "Water Discharge",
        "units": "m3/Hr",
        "icon": "",
        "prefix": "",
        "suffix": "",
        "segments": [
            {
                "from": "0",
                "color": "#ff0000"
            },
            {
                "from": "275",
                "color": "#ffc800"
            },
            {
                "from": "280",
                "color": "#00ff00"
            }
        ],
        "min": 0,
        "max": "300",
        "sizeThickness": "25",
        "sizeGap": 4,
        "sizeKeyThickness": "7",
        "styleRounded": true,
        "styleGlow": false,
        "className": "",
        "x": 990,
        "y": 60,
        "wires": [],
        "inputLabels": [
            "Label"
        ]
    },
    {
        "id": "7982839ac920dbe7",
        "type": "ui-gauge",
        "z": "970da4334e1d65fb",
        "name": "",
        "group": "10aa9aade759bfbc",
        "order": 0,
        "width": "2",
        "height": "2",
        "gtype": "gauge-half",
        "gstyle": "rounded",
        "title": "Level",
        "units": "m",
        "icon": "",
        "prefix": "",
        "suffix": "",
        "segments": [
            {
                "from": "-0.5",
                "color": "#ff0000"
            },
            {
                "from": "0",
                "color": "#ffc800"
            },
            {
                "from": "0.5",
                "color": "#00ff00"
            },
            {
                "from": "1",
                "color": "#ff0000"
            }
        ],
        "min": "-0.75",
        "max": "2",
        "sizeThickness": "25",
        "sizeGap": 4,
        "sizeKeyThickness": "7",
        "styleRounded": true,
        "styleGlow": false,
        "className": "",
        "x": 950,
        "y": 100,
        "wires": [],
        "inputLabels": [
            "Label"
        ]
    },
    {
        "id": "b5e4e1f4cdf63a7e",
        "type": "debug",
        "z": "970da4334e1d65fb",
        "name": "debug 8",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 960,
        "y": 160,
        "wires": []
    },
    {
        "id": "5000044ed704758a",
        "type": "ui-chart",
        "z": "970da4334e1d65fb",
        "group": "3ac23f926535ac6d",
        "name": "",
        "label": "chart",
        "order": 9007199254740991,
        "chartType": "line",
        "category": "topic",
        "categoryType": "msg",
        "xAxisProperty": "",
        "xAxisPropertyType": "msg",
        "xAxisType": "time",
        "yAxisProperty": "",
        "ymin": "",
        "ymax": "",
        "action": "append",
        "pointShape": "circle",
        "pointRadius": 4,
        "showLegend": true,
        "removeOlder": 1,
        "removeOlderUnit": "3600",
        "removeOlderPoints": "",
        "colors": [
            "#1f77b4",
            "#aec7e8",
            "#ff7f0e",
            "#2ca02c",
            "#98df8a",
            "#d62728",
            "#ff9896",
            "#9467bd",
            "#c5b0d5"
        ],
        "width": 6,
        "height": 8,
        "className": "",
        "x": 990,
        "y": 240,
        "wires": [
            []
        ]
    },
    {
        "id": "86ec7a14810a4f08",
        "type": "change",
        "z": "970da4334e1d65fb",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "topic",
                "pt": "msg",
                "to": "m3/hr",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 810,
        "y": 240,
        "wires": [
            [
                "5000044ed704758a"
            ]
        ]
    },
    {
        "id": "10aa9aade759bfbc",
        "type": "ui-group",
        "name": "Parameters",
        "page": "d6e9dc74cb5e8eec",
        "width": "6",
        "height": "1",
        "order": -1,
        "showTitle": true,
        "className": "",
        "visible": "true",
        "disabled": "false"
    },
    {
        "id": "3ac23f926535ac6d",
        "type": "ui-group",
        "name": "Belt Rates",
        "page": "69595916b9bf197c",
        "width": "6",
        "height": "1",
        "order": 1,
        "showTitle": true,
        "className": "",
        "visible": "true",
        "disabled": "false"
    },
    {
        "id": "d6e9dc74cb5e8eec",
        "type": "ui-page",
        "name": "Quarry Water",
        "ui": "db8f30422ac40ba3",
        "path": "/page2",
        "icon": "water",
        "layout": "notebook",
        "theme": "18ae676e25d9a3df",
        "order": -1,
        "className": "",
        "visible": true,
        "disabled": "false"
    },
    {
        "id": "69595916b9bf197c",
        "type": "ui-page",
        "name": "Wash Plant",
        "ui": "db8f30422ac40ba3",
        "path": "/page1",
        "icon": "washing-machine",
        "layout": "grid",
        "theme": "18ae676e25d9a3df",
        "order": -1,
        "className": "",
        "visible": true,
        "disabled": false
    },
    {
        "id": "db8f30422ac40ba3",
        "type": "ui-base",
        "name": "E&JW Glendinning Ltd",
        "path": "/dashboard",
        "includeClientData": true,
        "acceptsClientConfig": [
            "ui-notification",
            "ui-control"
        ],
        "showPathInSidebar": false,
        "navigationStyle": "default"
    },
    {
        "id": "18ae676e25d9a3df",
        "type": "ui-theme",
        "name": "Theme Name",
        "colors": {
            "surface": "#ffffff",
            "primary": "#cc0000",
            "bgPage": "#eeeeee",
            "groupBg": "#ffffff",
            "groupOutline": "#cccccc"
        },
        "sizes": {
            "pagePadding": "12px",
            "groupGap": "12px",
            "groupBorderRadius": "4px",
            "widgetGap": "12px"
        }
    }
]

Cheers Steve-Mcl, I'll include my code next time with screen shots. I myself find screen shots easier than code but do agree providing the codes better if people can help.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.