{{-- A small trend line (fixed size, no axes). $values: list of numbers, oldest first. --}} @php $vals = array_values($values); $n = count($vals); $mx = $n ? max($vals) : 0; $w = 96; $h = 24; $px = fn ($i) => $n > 1 ? round(2 + $i * ($w - 4) / ($n - 1), 1) : $w / 2; $py = fn ($v) => round($h - 3 - ($mx > 0 ? $v / $mx * ($h - 6) : 0), 1); @endphp