How does one format the data properly for pie chart in Chart.JS

Apologies, I am tearing my hair out trying to figure out how to properly format the data to input into a pie chart Chart.JS element:

In the LABEL formula section, I am using the following:


This returns the label array:

["Torray ", “Osterweis”]

In the dataset section, I am using the following formula:


This yields the output array:


But the chart does not show. I tried to read through the Dashboard app example for the pie chart, but did not understand it.

Can anyone please help me fix this?

Thank you,


Are you using the “advanced” mode in the settings?
The datasets parameter is not an array of values but an array of objects.

If you have a look at the pie documentation you can see an example of datasets like this:

  datasets: [{
    label: 'My First Dataset',
    data: [300, 50, 100],
    backgroundColor: [
      'rgb(255, 99, 132)',
      'rgb(54, 162, 235)',
      'rgb(255, 205, 86)'
    hoverOffset: 4

Dorilama, Thanks! I got it to work.

1 Like