# No Display in chart Node

**URL:** <https://discourse.nodered.org/t/no-display-in-chart-node/94571>\
**Category:** Dashboard\
**Tags:** function-node, dashboard-2\
**Created:** [13 January 2025 10:39 UTC](https://discourse.nodered.org/t/no-display-in-chart-node/94571 "2025-01-13T10:39:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![firstfacility](https://avatars.discourse-cdn.com/v4/letter/f/ce7236/32.png) [@firstfacility](https://discourse.nodered.org/u/firstfacility)\
**Post date:** [13 January 2025 10:39 UTC](https://discourse.nodered.org/t/no-display-in-chart-node/94571/1 "2025-01-13T10:39:34Z")

</div>

```auto
[
    {
        "id": "545937a92027a29d",
        "type": "function",
        "z": "c7b6d33bb6abd6a9",
        "name": "function 23",
        "func": "// Testdaten erzeugen (Beispiel: Herzfrequenzdaten)\nconst testData = [\n { date: \"2025-01-13T00:00:00Z\", Avg: 72 },\n { date: \"2025-01-13T00:05:00Z\", Avg: 75 },\n { date: \"2025-01-13T00:10:00Z\", Avg: 78 },\n { date: \"2025-01-13T00:15:00Z\", Avg: 70 },\n { date: \"2025-01-13T00:20:00Z\", Avg: 72 },\n { date: \"2025-01-13T00:25:00Z\", Avg: 74 },\n { date: \"2025-01-13T00:30:00Z\", Avg: 76 }\n];\n\n// Extrahieren von Zeit und Durchschnittspuls (Avg)\nconst result = testData.map(entry => {\n // Zeit als UNIX-Timestamp (Sekunden)\n const entryTime = new Date(entry.date).getTime() / 1000; // Zeit in Sekunden\n return {\n time: entryTime,\n heartRate: Math.round(entry.Avg) // Runden auf ganze Zahlen\n };\n});\n\n// Bereite die Daten für die Chart-Node auf (nur data, ohne labels)\nmsg.payload = {\n series: [\"Heart Rate\"],\n data: [result.map(item => ({ x: item.time, y: item.heartRate }))],\n // labels: result.map(item => new Date(item.time * 1000).toLocaleTimeString(\"de-DE\", {\n // hour: \"2-digit\",\n // minute: \"2-digit\",\n // second: \"2-digit\"\n // })) // Labels vorübergehend entfernt\n};\n\n// Debug-Ausgabe: Überprüfen des Payloads\nnode.warn(\"Debug Payload: \" + JSON.stringify(msg.payload));\n\n// Der Payload ist nun ein Objekt und kann an die Chart-Node übergeben werden\nreturn msg;\n\n\n",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1030,
        "y": 660,
        "wires": [
            [
                "ba6091de4541138b",
                "fd8eed678e0f43e4"
            ]
        ]
    },
    {
        "id": "ba6091de4541138b",
        "type": "ui_chart",
        "z": "c7b6d33bb6abd6a9",
        "name": "Heart Rate Chart",
        "group": "dc16b3d832f2905d",
        "order": 1,
        "width": "12",
        "height": "5",
        "label": "Heart Rate over Time",
        "chartType": "line",
        "legend": "false",
        "xformat": "HH:mm:ss",
        "interpolate": "linear",
        "nodata": "No data",
        "dot": false,
        "ymin": "50",
        "ymax": "150",
        "removeOlder": "1",
        "removeOlderPoints": "",
        "removeOlderUnit": "86400",
        "cutout": 0,
        "useOneColor": false,
        "useUTC": false,
        "colors": [
            "#00bfff",
            "#ff8000",
            "#a6ce39",
            "#000000",
            "#000000",
            "#000000",
            "#000000",
            "#000000",
            "#000000"
        ],
        "outputs": 1,
        "useDifferentColor": false,
        "className": "",
        "x": 890,
        "y": 560,
        "wires": [
            []
        ]
    },
    {
        "id": "9dab3cbba3da8e07",
        "type": "inject",
        "z": "c7b6d33bb6abd6a9",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 860,
        "y": 660,
        "wires": [
            [
                "545937a92027a29d"
            ]
        ]
    },
    {
        "id": "fd8eed678e0f43e4",
        "type": "debug",
        "z": "c7b6d33bb6abd6a9",
        "name": "debug 5",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 1100,
        "y": 540,
        "wires": []
    },
    {
        "id": "dc16b3d832f2905d",
        "type": "ui_group",
        "name": "EKG",
        "tab": "16db628f79fd6854",
        "order": 4,
        "disp": false,
        "width": "12",
        "collapse": false,
        "className": ""
    },
    {
        "id": "16db628f79fd6854",
        "type": "ui_tab",
        "name": "Gesundheit",
        "icon": "local_pharmacy",
        "order": 9,
        "disabled": false,
        "hidden": false
    }
]

```

Hi,  
Why is nothing displayed in the chart node? What am I doing wrong?  
Frank

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [13 January 2025 11:37 UTC](https://discourse.nodered.org/t/no-display-in-chart-node/94571/2 "2025-01-13T11:37:33Z")

</div>

Your topic tags say Dashboard 2 but you are using Dashboard 1, please clarify which and alter tag to node-red-dashboard if you are using 1.

For DB 1 payload needs to be an array

```auto
msg.payload = [
    {
        series: ["Heart Rate"],
        data: [result.map(item => ({ x: item.time, y: item.heartRate }))]
    }
];

```

---

<div class="post-metadata">

**Author:** ![firstfacility](https://avatars.discourse-cdn.com/v4/letter/f/ce7236/32.png) [@firstfacility](https://discourse.nodered.org/u/firstfacility)\
**Post date:** [13 January 2025 13:28 UTC](https://discourse.nodered.org/t/no-display-in-chart-node/94571/3 "2025-01-13T13:28:02Z")

</div>

Very good, thank's

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [13 April 2025 13:28 UTC](https://discourse.nodered.org/t/no-display-in-chart-node/94571/4 "2025-04-13T13:28:40Z")

</div>

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