# LEVEL\_ERROR message: "components.PieChart: Data invalid. Each pie section object must have a label (string) and a value (number)"

**URL:** <https://forum.inductiveautomation.com/t/level-error-message-components-piechart-data-invalid-each-pie-section-object-must-have-a-label-string-and-a-value-number/117814>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [November 11, 2026, 7:06pm UTC](https://forum.inductiveautomation.com/t/level-error-message-components-piechart-data-invalid-each-pie-section-object-must-have-a-label-string-and-a-value-number/117814 "2026-11-11T19:06:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jseffinga](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@jseffinga](https://forum.inductiveautomation.com/u/jseffinga)\
**Post date:** [November 11, 2026, 7:06pm UTC](https://forum.inductiveautomation.com/t/level-error-message-components-piechart-data-invalid-each-pie-section-object-must-have-a-label-string-and-a-value-number/117814/1 "2026-11-11T19:06:18Z")

</div>

I found an issue with the pie chart im looking for help with.

I have a pie chart and an SQL query.

The query is this

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/7/c7e8a07fa3ed4b221ecbf62c77ef6f94ecff225f.png)

Table has both varchar data types.

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/c/aca887ba55b95decbc50a469494425a2600c4205.png)

When i bind the data to the pie chart no matter what post process manipulation i do it give me this error.

ERROR Perspective.Designer.Workspace -- level: LEVEL\_ERROR  
message: "components.PieChart: Data invalid. Each pie section object must have a label (string) and a value (number)"  
line\_number: 2

Found out its because even tho my data types are char the pie chart keeps automatically changing my badge number to an int since the ones in the table dont have letters in them.

if i add one with a letter in the table its all fixed otherwise doesnt work.

Any Suggestions?

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [November 11, 2026, 8:13pm UTC](https://forum.inductiveautomation.com/t/level-error-message-components-piechart-data-invalid-each-pie-section-object-must-have-a-label-string-and-a-value-number/117814/2 "2026-11-11T20:13:46Z")

</div>

You can try concatenating a nonprintable character to it:

```sql
SELECT
    CONCAT(badge_number, NULL) as badge_number,
    COUNT(*) as count
FROM HS1_6SPD_BADGE_TABLE
GROUP BY badge_number

```

Trying it through an expression seems to keep it as a string:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/6/b6a634aa546c3ee4ad20a0139fca49673f42fe0f.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/7/77509e4a25737d5726feb2558134f5b25609b92e.png)
