@props(['chart']) @php /** @var array{title: string, series: array} $chart */ $series = collect($chart['series'] ?? []); $max = max(1, (float) $series->max('value')); $palette = ['primary', 'success', 'info', 'warning', 'danger', 'secondary']; @endphp
{{ $chart['title'] ?? 'Chart' }}
@forelse ($series as $i => $point) @php $pct = round(((float) $point['value'] / $max) * 100, 1); @endphp
{{ $point['label'] }} {{ rtrim(rtrim(number_format((float) $point['value'], 1), '0'), '.') }}
@empty

No data to chart.

@endforelse