Doughnut chart lines
Hi, I want to show a doughnut chart, but I see lines and numbers. How do I get rid of these?
Solution:Jump to solution
In your widget try adding:
protected static ?array $options = [ 'scales' => [ 'y' => [...
protected static ?array $options = [ 'scales' => [ 'y' => [...
4 Replies
Doughnut and Pie Charts | Chart.js
Open source HTML5 Charts for your website
You can return Chart.js configuration in
getData()
I believe the border*
properties are what controls that.Yep, we disabled them as well. Makes no sense to have them on pie and donut charts
Solution
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
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