days))->daily(); $colors = ['#f59e0b', '#3b82f6', '#10b981', '#ef4444', '#8b5cf6']; return [ 'labels' => $daily['labels'], 'datasets' => collect($daily['series']) ->values() ->map(fn (array $data, int $i) => [ 'label' => config('locales.supported.'.array_keys($daily['series'])[$i].'.native'), 'data' => $data, 'borderColor' => $colors[$i % count($colors)], 'backgroundColor' => $colors[$i % count($colors)], 'tension' => 0.3, ]) ->all(), ]; } }