Anderson Belderrama
Remove Grid from Pie/Doughnut(chart-widget)
It took me a few hours to discover and configure the Pie chart. Because it comes by default with a grid of other sample graphs. I want to contribute, so that other people don't waste the same time I lost. Add the following code to your chart class.
protected static ?array $options = [
'scales' => [
'y' => [
'grid' => [
'display' => false,
],
'ticks' => [
'display' => false,
]
],
'x' => [
'grid' => [
'display' => false,
],
'ticks' => [
'display' => false,
]
],
],
];
3 replies