@php($maxValue = collect($data)->map(function ($point) { return $point[0]; })->max()) @php($points = collect($data)->map(function ($point, $index) use ($maxValue) { return "L {$index} ". ($maxValue - $point[0]); })->join(' ')) @foreach ($data as $index => [$value, $label])
{{ $label }}
{{ $value }}
@endforeach