{{-- Columns: one per hour of the day (or any short ordered set). $values [0 => n, …, 23 => n] (or ['label' => n] with $labels = false) $noun 'views' $hours true: keys are hours 0–23 (labels 12 AM · 6 AM · 12 PM · 6 PM) --}} @php $hours ??= true; $noun ??= ''; $max = $values ? max($values) : 0; [$top, $ticks] = \App\Support\Charts::scale((float) $max, 3); $keys = array_keys($values); $peak = $max > 0 ? array_search($max, $values, true) : null; $aria = ucfirst($noun).' by '.($hours ? 'hour of the day' : 'group').($peak !== null ? ', busiest '.($hours ? \App\Support\Charts::hour((int) $peak) : $peak) : '').'. The table below has every value.'; @endphp