@foreach($benchmarkComparison as $slug => $data)
{{ $data['category_icon'] }}
{{ $data['category_name'] }}
{{ $data['icon'] }} {{ $data['diff_text'] }}
{{ $data['label'] }}
{{-- Visual bar with benchmark marker --}}
@php
$scoreColor = \App\Models\Category::getScoreInterpretation($data['score'])['color'];
@endphp
{{-- Benchmark marker line --}}
{{-- Top quartile marker --}}
@if($data['top_quartile'])
@endif
{{-- Labels --}}
{{ round($data['score']) }}% Your Score
|
{{ $data['benchmark_value'] }}% {{ $benchmarkComparison[$slug]['benchmark_label'] ?? 'Benchmark' }}
@if($data['top_quartile'])
|
{{ $data['top_quartile'] }}% Top Quartile
@endif
@if($data['quartile'] === 'top')
Top 25%
@elseif($data['quartile'] === 'bottom')
Bottom 25%
@endif
@endforeach
{{-- Source --}}
@php $firstSource = collect($benchmarkComparison)->pluck('source')->filter()->first(); @endphp
@if($firstSource)
Source: {{ $firstSource }}
@endif