Doughnut chart lines

Hi, I want to show a doughnut chart, but I see lines and numbers. How do I get rid of these?
No description
Solution:
In your widget try adding:
protected static ?array $options = [ 'scales' => [ 'y' => [...
Jump to solution
4 Replies
Tetracyclic
Tetracyclic9mo ago
You can return Chart.js configuration in getData() I believe the border* properties are what controls that.
Mark Chaney
Mark Chaney9mo ago
Yep, we disabled them as well. Makes no sense to have them on pie and donut charts
Solution
Jap
Jap9mo ago
In your widget try adding:
protected static ?array $options = [ 'scales' => [ 'y' => [ 'grid' => [ 'display' => false, ], 'ticks' => [ 'display' => false, ], ], 'x' => [ 'grid' => [ 'display' => false, ], 'ticks' => [ 'display' => false, ], ], ], ]; https://filamentphp.com/docs/3.x/widgets/charts#setting-chart-configuration-options

Did you find this page helpful?