How to remove 2nd y axis in charts?

After upgrading from v2 to v3 some of my charts now have a 2nd y axis Previously in v2 this problem did not happen How do I remove the 0.1, 0.2, 0.3? Here is my configuration code for the chart
protected static ?array $options = [
'scales' => [
'yAxes' => [
'ticks' => [
'stepSize' => 1,
],
],
],
];
protected static ?array $options = [
'scales' => [
'yAxes' => [
'ticks' => [
'stepSize' => 1,
],
],
],
];
protected function getData(): array
{
$newUsers = [];
$labels = [];
$colors = [];
for ($daysBackwards = $this->filter; $daysBackwards >= 0; $daysBackwards--) {

$newUsers[] = User::whereDate('created_at', Carbon::today()->subDays($daysBackwards))->count();
$labels[] = $daysBackwards.' day ago';
$colors[] = generate_random_colour();
}


return [
'datasets' => [
[
'label' => 'New Users',
'data' => $newUsers,
'backgroundColor' => $colors,
],
],
'labels' => $labels,
];
}
protected function getData(): array
{
$newUsers = [];
$labels = [];
$colors = [];
for ($daysBackwards = $this->filter; $daysBackwards >= 0; $daysBackwards--) {

$newUsers[] = User::whereDate('created_at', Carbon::today()->subDays($daysBackwards))->count();
$labels[] = $daysBackwards.' day ago';
$colors[] = generate_random_colour();
}


return [
'datasets' => [
[
'label' => 'New Users',
'data' => $newUsers,
'backgroundColor' => $colors,
],
],
'labels' => $labels,
];
}
No description
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server