# Blank Pie Chart

**URL:** <https://discourse.nodered.org/t/blank-pie-chart/97072>\
**Category:** Dashboard\
**Tags:** dashboard-2\
**Created:** [15 May 2025 01:30 UTC](https://discourse.nodered.org/t/blank-pie-chart/97072 "2025-05-15T01:30:25Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dar](https://avatars.discourse-cdn.com/v4/letter/d/5f8ce5/32.png) [@Dar](https://discourse.nodered.org/u/Dar)\
**Post date:** [15 May 2025 01:30 UTC](https://discourse.nodered.org/t/blank-pie-chart/97072/1 "2025-05-15T01:30:25Z")

</div>

Hello!  
I want to ask for help regarding my pie chart that is blank where nothing was displayed but the widget, I am trying to display live data from plc of how many time the machine alarm occurs. This is my first time using pie chart, any advice would be appreciated.

```auto
[
    {
        "id": "a802c2913f2f5b11",
        "type": "debug",
        "z": "4e40fbd2a88aea91",
        "name": "debug 3",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 900,
        "y": 420,
        "wires": []
    },
    {
        "id": "0a5c46c80121f2c1",
        "type": "inject",
        "z": "4e40fbd2a88aea91",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "05 19 * * *",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 130,
        "y": 500,
        "wires": [
            [
                "190902706af2c205"
            ]
        ]
    },
    {
        "id": "190902706af2c205",
        "type": "function",
        "z": "4e40fbd2a88aea91",
        "name": "Prepare SQL Query for Alarm Occurrences",
        "func": "const now = new Date();\nconst year = now.getFullYear();\nconst month = now.getMonth();\nconst day = now.getDate();\n\nconst sevenAM = new Date(year, month, day, 7, 0, 0, 0);\nconst sevenPM = new Date(year, month, day, 19, 0, 0, 0);\n\nconst startTimeSQL = sevenAM.toISOString().slice(0, 19).replace('T', ' ');\nconst endTimeSQL = sevenPM.toISOString().slice(0, 19).replace('T', ' ');\n\nmsg.payload = `\n SELECT AlarmName, COUNT(*) as Occurrences\n FROM dbo.Alarms\n WHERE TimeDate >= '${startTimeSQL}' AND TimeDate < '${endTimeSQL}'\n GROUP BY AlarmName\n ORDER BY Occurrences DESC\n`;\n\nnode.log(\"SQL Query for Alarm Occurrences: \" + msg.payload);\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 390,
        "y": 500,
        "wires": [
            [
                "0af751af012c1567"
            ]
        ]
    },
    {
        "id": "0af751af012c1567",
        "type": "MSSQL",
        "z": "4e40fbd2a88aea91",
        "mssqlCN": "60c5e3d85f4c16dc",
        "name": "Alarm Type",
        "outField": "payload",
        "returnType": 0,
        "throwErrors": 1,
        "query": "",
        "modeOpt": "queryMode",
        "modeOptType": "query",
        "queryOpt": "payload",
        "queryOptType": "editor",
        "paramsOpt": "queryParams",
        "paramsOptType": "none",
        "rows": "rows",
        "rowsType": "msg",
        "parseMustache": true,
        "params": [],
        "x": 710,
        "y": 500,
        "wires": [
            [
                "a802c2913f2f5b11",
                "510c4ff379ebf122"
            ]
        ]
    },
    {
        "id": "ae02da5a5b556d2a",
        "type": "ui-chart",
        "z": "4e40fbd2a88aea91",
        "group": "744e43174aca1731",
        "name": "Alarm Occurance",
        "label": "",
        "order": 1,
        "chartType": "pie",
        "category": "",
        "categoryType": "none",
        "xAxisLabel": "",
        "xAxisProperty": "payload.labels",
        "xAxisPropertyType": "msg",
        "xAxisType": "radial",
        "xAxisFormat": "",
        "xAxisFormatType": "auto",
        "xmin": "",
        "xmax": "",
        "yAxisLabel": "",
        "yAxisProperty": "payload.data",
        "yAxisPropertyType": "msg",
        "ymin": "",
        "ymax": "",
        "bins": 10,
        "action": "replace",
        "stackSeries": false,
        "pointShape": "circle",
        "pointRadius": 4,
        "showLegend": true,
        "removeOlder": 1,
        "removeOlderUnit": "3600",
        "removeOlderPoints": "",
        "colors": [
            "#0095ff",
            "#ff0000",
            "#ff7f0e",
            "#2ca02c",
            "#a347e1",
            "#d62728",
            "#ff9896",
            "#9467bd",
            "#c5b0d5"
        ],
        "textColor": [
            "#666666"
        ],
        "textColorDefault": true,
        "gridColor": [
            "#ffffff"
        ],
        "gridColorDefault": true,
        "width": "6",
        "height": "4",
        "className": "",
        "interpolation": "linear",
        "x": 1310,
        "y": 500,
        "wires": [
            []
        ]
    },
    {
        "id": "f5fe3c676621b6ed",
        "type": "debug",
        "z": "4e40fbd2a88aea91",
        "name": "debug 9",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 1280,
        "y": 420,
        "wires": []
    },
    {
        "id": "510c4ff379ebf122",
        "type": "function",
        "z": "4e40fbd2a88aea91",
        "name": "Format Data for Pie Chart",
        "func": "const databaseResults = msg.payload;\nconst labels = [];\nconst data = [];\n\nif (Array.isArray(databaseResults)) {\n databaseResults.forEach(row => {\n labels.push(row.AlarmName);\n data.push(row.Occurrences);\n });\n}\n\nmsg.payload = {\n \"labels\": labels,\n \"data\": [data],\n \"series\": [\"Occurrences\"]\n};\n\nmsg.topic = \"Alarm Occurrences (7 AM - 7 PM)\";\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1010,
        "y": 500,
        "wires": [
            [
                "ae02da5a5b556d2a",
                "f5fe3c676621b6ed"
            ]
        ]
    },
    {
        "id": "60c5e3d85f4c16dc",
        "type": "MSSQL-CN",
        "tdsVersion": "7_4",
        "name": "HMI",
        "server": "10.183.191.9",
        "port": "1433",
        "encyption": true,
        "trustServerCertificate": true,
        "database": "HMI",
        "useUTC": true,
        "connectTimeout": "15000",
        "requestTimeout": "15000",
        "cancelTimeout": "5000",
        "pool": "5",
        "parseJSON": false,
        "enableArithAbort": true,
        "readOnlyIntent": false
    },
    {
        "id": "744e43174aca1731",
        "type": "ui-group",
        "name": "Top Alarm Occurances",
        "page": "36d8747804871232",
        "width": "6",
        "height": 1,
        "order": 11,
        "showTitle": true,
        "className": "",
        "visible": "true",
        "disabled": "false",
        "groupType": "default"
    },
    {
        "id": "36d8747804871232",
        "type": "ui-page",
        "name": "Delta SA 03",
        "ui": "e37b297fa64e1312",
        "path": "/page1",
        "icon": "home",
        "layout": "grid",
        "theme": "8796486dd6098e1f",
        "breakpoints": [
            {
                "name": "Default",
                "px": "0",
                "cols": "3"
            },
            {
                "name": "Tablet",
                "px": "576",
                "cols": "6"
            },
            {
                "name": "Small Desktop",
                "px": "768",
                "cols": "9"
            },
            {
                "name": "Desktop",
                "px": "1024",
                "cols": "12"
            }
        ],
        "order": 4,
        "className": "",
        "visible": true,
        "disabled": false
    },
    {
        "id": "e37b297fa64e1312",
        "type": "ui-base",
        "name": "My Dashboard",
        "path": "/dashboard",
        "appIcon": "",
        "includeClientData": true,
        "acceptsClientConfig": [
            "ui-notification",
            "ui-control"
        ],
        "showPathInSidebar": false,
        "headerContent": "page",
        "navigationStyle": "default",
        "titleBarStyle": "default",
        "showReconnectNotification": true,
        "notificationDisplayTime": 1,
        "showDisconnectNotification": true,
        "allowInstall": true
    },
    {
        "id": "8796486dd6098e1f",
        "type": "ui-theme",
        "name": "Theme 2",
        "colors": {
            "surface": "#0f0f0f",
            "primary": "#050505",
            "bgPage": "#767474",
            "groupBg": "#000000",
            "groupOutline": "#ffffff"
        },
        "sizes": {
            "density": "default",
            "pagePadding": "12px",
            "groupGap": "12px",
            "groupBorderRadius": "4px",
            "widgetGap": "1px"
        }
    }
]

```

Debug node 9

```auto
{"_msgid":"c511ed33546ce043","payload":{"labels":["Spindle 8 Low Roll","Spindle 8 Low Roll Warning","Light Curtain Violation","Spindle 2 Low Roll Warning","Spindle 1 Low Roll Warning","Spindle 1 Low Roll","Spindle 2 Low Roll","IP1 Vison Continuous Rejects","Spindle 7 Web Break","IP2 Vison Continuous Rejects","Axis 8 and 9 Guarding not Closed","IP1 Nip Missing Registration Marks","Press Start or Jog to Move Roll Lift","Spindle 1 Lift Not In Position","Island Placement Spindle 1 Web Break","Spindle 3 Web Break","Splice Clamp 1 On Alarm","IP3 Nip Missing Registration Marks","IP3 Vison Continuous Rejects"],"data":[[26,26,23,20,20,16,10,8,6,4,4,2,2,2,2,2,2,1,1]],"series":["Occurrences"]},"topic":"Alarm Occurrences (7 AM - 7 PM)","query":"\n SELECT AlarmName, COUNT(*) as Occurrences\n FROM dbo.Alarms\n WHERE TimeDate >= '2025-05-14 23:00:00' AND TimeDate < '2025-05-15 11:00:00'\n GROUP BY AlarmName\n ORDER BY Occurrences DESC\n","queryMode":"query","queryParams":[],"sqlInfo":[]}

```

Debug node 3

```auto
{"_msgid":"3dda5befd3b58f0f","payload":[{"AlarmName":"Spindle 8 Low Roll","Occurrences":26},{"AlarmName":"Spindle 8 Low Roll Warning","Occurrences":26},{"AlarmName":"Light Curtain Violation","Occurrences":24},{"AlarmName":"Spindle 1 Low Roll Warning","Occurrences":20},{"AlarmName":"Spindle 2 Low Roll Warning","Occurrences":20},{"AlarmName":"Spindle 1 Low Roll","Occurrences":16},{"AlarmName":"Spindle 2 Low Roll","Occurrences":10},{"AlarmName":"IP1 Vison Continuous Rejects","Occurrences":8},{"AlarmName":"Spindle 7 Web Break","Occurrences":6},{"AlarmName":"IP2 Vison Continuous Rejects","Occurrences":4},{"AlarmName":"Axis 8 and 9 Guarding not Closed","Occurrences":4},{"AlarmName":"IP1 Nip Missing Registration Marks","Occurrences":2},{"AlarmName":"Press Start or Jog to Move Roll Lift","Occurrences":2},{"AlarmName":"Spindle 1 Lift Not In Position","Occurrences":2},{"AlarmName":"IP3 Nip Missing Registration Marks","Occurrences":2},{"AlarmName":"IP3 Vison Continuous Rejects","Occurrences":2},{"AlarmName":"Island Placement Spindle 1 Web Break","Occurrences":2},{"AlarmName":"Splice Clamp 1 On Alarm","Occurrences":2},{"AlarmName":"Spindle 3 Web Break","Occurrences":2}],"topic":"","query":"\n SELECT AlarmName, COUNT(*) as Occurrences\n FROM dbo.Alarms\n WHERE TimeDate >= '2025-05-14 23:00:00' AND TimeDate < '2025-05-15 11:00:00'\n GROUP BY AlarmName\n ORDER BY Occurrences DESC\n","queryMode":"query","queryParams":[],"sqlInfo":[]}

```

---

<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:** [15 May 2025 06:00 UTC](https://discourse.nodered.org/t/blank-pie-chart/97072/2 "2025-05-15T06:00:04Z")

</div>

No need for function node, use the sql data direct in the chart using the keys.  
e.g.

```auto
[{"id":"0a5c46c80121f2c1","type":"inject","z":"d1395164b4eec73e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[{\"AlarmName\":\"Spindle 8 Low Roll\",\"Occurrences\":26},{\"AlarmName\":\"Spindle 8 Low Roll Warning\",\"Occurrences\":26},{\"AlarmName\":\"Light Curtain Violation\",\"Occurrences\":24},{\"AlarmName\":\"Spindle 1 Low Roll Warning\",\"Occurrences\":20},{\"AlarmName\":\"Spindle 2 Low Roll Warning\",\"Occurrences\":20},{\"AlarmName\":\"Spindle 1 Low Roll\",\"Occurrences\":16},{\"AlarmName\":\"Spindle 2 Low Roll\",\"Occurrences\":10},{\"AlarmName\":\"IP1 Vison Continuous Rejects\",\"Occurrences\":8},{\"AlarmName\":\"Spindle 7 Web Break\",\"Occurrences\":6},{\"AlarmName\":\"IP2 Vison Continuous Rejects\",\"Occurrences\":4},{\"AlarmName\":\"Axis 8 and 9 Guarding not Closed\",\"Occurrences\":4},{\"AlarmName\":\"IP1 Nip Missing Registration Marks\",\"Occurrences\":2},{\"AlarmName\":\"Press Start or Jog to Move Roll Lift\",\"Occurrences\":2},{\"AlarmName\":\"Spindle 1 Lift Not In Position\",\"Occurrences\":2},{\"AlarmName\":\"IP3 Nip Missing Registration Marks\",\"Occurrences\":2},{\"AlarmName\":\"IP3 Vison Continuous Rejects\",\"Occurrences\":2},{\"AlarmName\":\"Island Placement Spindle 1 Web Break\",\"Occurrences\":2},{\"AlarmName\":\"Splice Clamp 1 On Alarm\",\"Occurrences\":2},{\"AlarmName\":\"Spindle 3 Web Break\",\"Occurrences\":2}]","payloadType":"json","x":790,"y":4980,"wires":[["a802c2913f2f5b11","ae02da5a5b556d2a"]]},{"id":"a802c2913f2f5b11","type":"debug","z":"d1395164b4eec73e","name":"debug 3","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1110,"y":4900,"wires":[]},{"id":"ae02da5a5b556d2a","type":"ui-chart","z":"d1395164b4eec73e","group":"9d83cd8b3d5ee33c","name":"Alarm Occurance","label":"","order":2,"chartType":"pie","category":"","categoryType":"none","xAxisLabel":"","xAxisProperty":"AlarmName","xAxisPropertyType":"property","xAxisType":"radial","xAxisFormat":"","xAxisFormatType":"auto","xmin":"","xmax":"","yAxisLabel":"","yAxisProperty":"Occurrences","yAxisPropertyType":"property","ymin":"","ymax":"","bins":10,"action":"replace","stackSeries":false,"pointShape":"circle","pointRadius":4,"showLegend":true,"removeOlder":1,"removeOlderUnit":"3600","removeOlderPoints":"","colors":["#0095ff","#ff0000","#ff7f0e","#2ca02c","#a347e1","#d62728","#ff9896","#9467bd","#c5b0d5"],"textColor":["#666666"],"textColorDefault":true,"gridColor":["#ffffff"],"gridColorDefault":true,"width":"6","height":"4","className":"","interpolation":"linear","x":1070,"y":4980,"wires":[[]]},{"id":"9d83cd8b3d5ee33c","type":"ui-group","name":"Group1","page":"c694d0ebe0d2b702","width":"6","height":"1","order":1,"showTitle":true,"className":"","visible":"true","disabled":"false","groupType":"default"},{"id":"c694d0ebe0d2b702","type":"ui-page","name":"Page1","ui":"1805777f90e92057","path":"/page1","icon":"home","layout":"grid","theme":"a965ccfef139317a","breakpoints":[{"name":"Default","px":0,"cols":3},{"name":"Tablet","px":576,"cols":6},{"name":"Small Desktop","px":768,"cols":9},{"name":"Desktop","px":1024,"cols":12}],"order":1,"className":"","visible":true,"disabled":false},{"id":"1805777f90e92057","type":"ui-base","name":"dashboard ","path":"/dashboard","appIcon":"","includeClientData":true,"acceptsClientConfig":["ui-notification","ui-control"],"showPathInSidebar":false,"headerContent":"page","titleBarStyle":"default","showReconnectNotification":false,"notificationDisplayTime":"5","showDisconnectNotification":false},{"id":"a965ccfef139317a","type":"ui-theme","name":"HN Theme","colors":{"surface":"#5c5c5c","primary":"#00fdff","bgPage":"#383838","groupBg":"#4f4f4f","groupOutline":"#858585"},"sizes":{"pagePadding":"12px","groupGap":"12px","groupBorderRadius":"4px","widgetGap":"12px"}}]

```

---

<div class="post-metadata">

**Author:** ![Dar](https://avatars.discourse-cdn.com/v4/letter/d/5f8ce5/32.png) [@Dar](https://discourse.nodered.org/u/Dar)\
**Post date:** [15 May 2025 06:45 UTC](https://discourse.nodered.org/t/blank-pie-chart/97072/3 "2025-05-15T06:45:13Z")

</div>

Thank you! It works, but why is the legend not showing up even though I gave legend a tick, Is it because of the size of data is too much? I tried increasing the widget size but still not working.

---

<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:** [15 May 2025 07:08 UTC](https://discourse.nodered.org/t/blank-pie-chart/97072/4 "2025-05-15T07:08:40Z")

</div>

Shows for me, try clear the nodes history in the config, then refresh the browser.

Add a string to the series setting and the legend should show. It is not pretty though.

 ![chrome_screenshot_15 May 2025 08_22_51 BST](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/b/6bed5dfe6d29431ebe4345a1e99b226cb970ef56.png)  
@joepavitt should this legend have some sort of formatting ? Even limiting to 10 the layout is fairly messed up.

---

<div class="post-metadata">

**Author:** ![Dar](https://avatars.discourse-cdn.com/v4/letter/d/5f8ce5/32.png) [@Dar](https://discourse.nodered.org/u/Dar)\
**Post date:** [15 May 2025 07:21 UTC](https://discourse.nodered.org/t/blank-pie-chart/97072/5 "2025-05-15T07:21:09Z")

</div>

I did what you asked for

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/4/642c7539ee67ff9157b4a836958cbf4e4841eebf.png)

```auto
[
    {
        "id": "a802c2913f2f5b11",
        "type": "debug",
        "z": "4e40fbd2a88aea91",
        "name": "debug 3",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 900,
        "y": 420,
        "wires": []
    },
    {
        "id": "0a5c46c80121f2c1",
        "type": "inject",
        "z": "4e40fbd2a88aea91",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "05 19 * * *",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 130,
        "y": 500,
        "wires": [
            [
                "190902706af2c205"
            ]
        ]
    },
    {
        "id": "190902706af2c205",
        "type": "function",
        "z": "4e40fbd2a88aea91",
        "name": "Prepare SQL Query for Alarm Occurrences",
        "func": "const now = new Date();\nconst year = now.getFullYear();\nconst month = now.getMonth();\nconst day = now.getDate();\n\nconst sevenAM = new Date(year, month, day, 7, 0, 0, 0);\nconst sevenPM = new Date(year, month, day, 19, 0, 0, 0);\n\nconst startTimeSQL = sevenAM.toISOString().slice(0, 19).replace('T', ' ');\nconst endTimeSQL = sevenPM.toISOString().slice(0, 19).replace('T', ' ');\n\nmsg.payload = `\n SELECT AlarmName, COUNT(*) as Occurrences\n FROM dbo.Alarms\n WHERE TimeDate >= '${startTimeSQL}' AND TimeDate < '${endTimeSQL}'\n GROUP BY AlarmName\n ORDER BY Occurrences DESC\n`;\n\nnode.log(\"SQL Query for Alarm Occurrences: \" + msg.payload);\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 390,
        "y": 500,
        "wires": [
            [
                "0af751af012c1567"
            ]
        ]
    },
    {
        "id": "0af751af012c1567",
        "type": "MSSQL",
        "z": "4e40fbd2a88aea91",
        "mssqlCN": "60c5e3d85f4c16dc",
        "name": "Alarm Type",
        "outField": "payload",
        "returnType": 0,
        "throwErrors": 1,
        "query": "",
        "modeOpt": "queryMode",
        "modeOptType": "query",
        "queryOpt": "payload",
        "queryOptType": "editor",
        "paramsOpt": "queryParams",
        "paramsOptType": "none",
        "rows": "rows",
        "rowsType": "msg",
        "parseMustache": true,
        "params": [],
        "x": 710,
        "y": 500,
        "wires": [
            [
                "a802c2913f2f5b11",
                "0497bce901fe6c3c"
            ]
        ]
    },
    {
        "id": "0497bce901fe6c3c",
        "type": "ui-chart",
        "z": "4e40fbd2a88aea91",
        "group": "744e43174aca1731",
        "name": "Alarm Occurance",
        "label": "Top Alarm Occurance",
        "order": 1,
        "chartType": "pie",
        "category": "",
        "categoryType": "none",
        "xAxisLabel": "",
        "xAxisProperty": "AlarmName",
        "xAxisPropertyType": "property",
        "xAxisType": "radial",
        "xAxisFormat": "",
        "xAxisFormatType": "auto",
        "xmin": "",
        "xmax": "",
        "yAxisLabel": "",
        "yAxisProperty": "Occurrences",
        "yAxisPropertyType": "property",
        "ymin": "",
        "ymax": "",
        "bins": 10,
        "action": "replace",
        "stackSeries": false,
        "pointShape": "circle",
        "pointRadius": 4,
        "showLegend": true,
        "removeOlder": 1,
        "removeOlderUnit": "3600",
        "removeOlderPoints": "",
        "colors": [
            "#0095ff",
            "#ff0000",
            "#ff7f0e",
            "#2ca02c",
            "#a347e1",
            "#d62728",
            "#ff9896",
            "#9467bd",
            "#c5b0d5"
        ],
        "textColor": [
            "#fafafa"
        ],
        "textColorDefault": true,
        "gridColor": [
            "#ffffff"
        ],
        "gridColorDefault": true,
        "width": "6",
        "height": "16",
        "className": "",
        "interpolation": "linear",
        "x": 950,
        "y": 500,
        "wires": [
            []
        ]
    },
    {
        "id": "60c5e3d85f4c16dc",
        "type": "MSSQL-CN",
        "tdsVersion": "7_4",
        "name": "HMI",
        "server": "10.183.191.9",
        "port": "1433",
        "encyption": true,
        "trustServerCertificate": true,
        "database": "HMI",
        "useUTC": true,
        "connectTimeout": "15000",
        "requestTimeout": "15000",
        "cancelTimeout": "5000",
        "pool": "5",
        "parseJSON": false,
        "enableArithAbort": true,
        "readOnlyIntent": false
    },
    {
        "id": "744e43174aca1731",
        "type": "ui-group",
        "name": "Top Alarm Occurances",
        "page": "36d8747804871232",
        "width": "16",
        "height": 1,
        "order": 11,
        "showTitle": true,
        "className": "",
        "visible": "true",
        "disabled": "false",
        "groupType": "default"
    },
    {
        "id": "36d8747804871232",
        "type": "ui-page",
        "name": "Delta SA 03",
        "ui": "e37b297fa64e1312",
        "path": "/page1",
        "icon": "home",
        "layout": "grid",
        "theme": "8796486dd6098e1f",
        "breakpoints": [
            {
                "name": "Default",
                "px": "0",
                "cols": "3"
            },
            {
                "name": "Tablet",
                "px": "576",
                "cols": "6"
            },
            {
                "name": "Small Desktop",
                "px": "768",
                "cols": "9"
            },
            {
                "name": "Desktop",
                "px": "1024",
                "cols": "12"
            }
        ],
        "order": 4,
        "className": "",
        "visible": "true",
        "disabled": "false"
    },
    {
        "id": "e37b297fa64e1312",
        "type": "ui-base",
        "name": "My Dashboard",
        "path": "/dashboard",
        "appIcon": "",
        "includeClientData": true,
        "acceptsClientConfig": [
            "ui-notification",
            "ui-control"
        ],
        "showPathInSidebar": false,
        "headerContent": "page",
        "navigationStyle": "default",
        "titleBarStyle": "default",
        "showReconnectNotification": true,
        "notificationDisplayTime": 1,
        "showDisconnectNotification": true,
        "allowInstall": true
    },
    {
        "id": "8796486dd6098e1f",
        "type": "ui-theme",
        "name": "Theme 2",
        "colors": {
            "surface": "#0f0f0f",
            "primary": "#050505",
            "bgPage": "#767474",
            "groupBg": "#000000",
            "groupOutline": "#ffffff"
        },
        "sizes": {
            "density": "default",
            "pagePadding": "12px",
            "groupGap": "4px",
            "groupBorderRadius": "4px",
            "widgetGap": "1px"
        }
    }
]

```

---

<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:** [15 May 2025 07:21 UTC](https://discourse.nodered.org/t/blank-pie-chart/97072/6 "2025-05-15T07:21:44Z")

</div>

See edit above.

---

<div class="post-metadata">

**Author:** ![Dar](https://avatars.discourse-cdn.com/v4/letter/d/5f8ce5/32.png) [@Dar](https://discourse.nodered.org/u/Dar)\
**Post date:** [15 May 2025 07:40 UTC](https://discourse.nodered.org/t/blank-pie-chart/97072/7 "2025-05-15T07:40:38Z")

</div>

> [@E1cid](#):
>
> Add a string to the series setting and the legend should show.

It worked, thank you very much but yeah it isn't pretty 😅

---

<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:** [15 May 2025 07:42 UTC](https://discourse.nodered.org/t/blank-pie-chart/97072/8 "2025-05-15T07:42:56Z")

</div>

Could you raise an issue about the legend formatting here [GitHub · Where software is built](https://github.com/FlowFuse/node-red-dashboard/issues)

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [15 May 2025 07:56 UTC](https://discourse.nodered.org/t/blank-pie-chart/97072/9 "2025-05-15T07:56:52Z")

</div>

> [@Dar](#):
>
> it isn't pretty

Maybe the pie chart (with legend) is not be the best way to represent this quantity of categories. Maybe consider showing the top 10 and group the rest as "others"?

---

<div class="post-metadata">

**Author:** ![Dar](https://avatars.discourse-cdn.com/v4/letter/d/5f8ce5/32.png) [@Dar](https://discourse.nodered.org/u/Dar)\
**Post date:** [15 May 2025 08:05 UTC](https://discourse.nodered.org/t/blank-pie-chart/97072/10 "2025-05-15T08:05:25Z")

</div>

I will in my free time, I don't have a github account yet I'll need to make one first

---

<div class="post-metadata">

**Author:** ![Dar](https://avatars.discourse-cdn.com/v4/letter/d/5f8ce5/32.png) [@Dar](https://discourse.nodered.org/u/Dar)\
**Post date:** [15 May 2025 08:11 UTC](https://discourse.nodered.org/t/blank-pie-chart/97072/11 "2025-05-15T08:11:46Z")

</div>

Yeah, I think I'll do that and hope it passes... I was told to show all of the categories, I might need to find another way to display my data instead of pie chart if it is rejected.

---

<div class="post-metadata">

**Author:** ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)\
**Post date:** [15 May 2025 14:12 UTC](https://discourse.nodered.org/t/blank-pie-chart/97072/12 "2025-05-15T14:12:40Z")

</div>

@Dar, Could you categorise the data into "general types", and then show these on multiple charts ?

---

<div class="post-metadata">

**Author:** ![Dar](https://avatars.discourse-cdn.com/v4/letter/d/5f8ce5/32.png) [@Dar](https://discourse.nodered.org/u/Dar)\
**Post date:** [16 May 2025 00:20 UTC](https://discourse.nodered.org/t/blank-pie-chart/97072/13 "2025-05-16T00:20:00Z")

</div>

That is a good Idea, I'll give it a try. thank you

---

<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:** [30 May 2025 00:20 UTC](https://discourse.nodered.org/t/blank-pie-chart/97072/14 "2025-05-30T00:20:48Z")

</div>

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