Bar Chart Widget labels not working (showing undefined)
I tried this values in return value for getData it shows undefined:
3 Replies
You need to have label inside datasets https://filamentphp.com/docs/3.x/widgets/charts#overview, from where did you copy this?
I just created the example myself, it seems label inside datasets only accepts string.
It works fine btw when I change the type to 'pie'.
It uses Chart.js under the hood, so you can check all options (customizations etc) through chart js docs https://www.chartjs.org/docs/latest/charts/doughnut.html