Blank Pie Chart

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.

[
    {
        "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

{"_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

{"_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":[]}

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

[{"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"}}]

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.

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.


@joepavitt should this legend have some sort of formatting ? Even limiting to 10 the layout is fairly messed up.

1 Like

I did what you asked for

[
    {
        "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"
        }
    }
]

See edit above.

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

Could you raise an issue about the legend formatting here GitHub · Where software is built

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"?

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

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.

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

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