{{-- Title: Doughnut Description: Doughnut block Category: formatting Icon: columns Keywords: doughnut Mode: edit Align: left PostTypes: post SupportsAlign: full SupportsMode: true SupportsMultiple: true EnqueueStyle: EnqueueScript: EnqueueAssets: --}} @php $colors = ["#362B6E", "#547095", "#80CFCD", "#88EFFA", "#CFCFCF", "#5B4AB4", "#006EFF", "#469C99", "#000000"]; $title = get_field('title'); $description = strip_tags(get_field('description'),'
'); $subscript = get_field('subscript'); $dataGroup = get_field('data_group'); @endphp
@if ($title)
{!! $title!!}
@endif @if ($description)
{!! $description !!}
@endif
    @foreach ($dataGroup as $index => $tab)
  • {{ $tab['tab_label'] }}
  • @endforeach
@foreach ($dataGroup as $index => $tab)
@php $title = $tab['title']; $caption = $tab['caption']; $values = array_map(function($value) { return number_format((float)$value['value'], 1, '.', ''); }, $tab['values']); $labels = array_map(function($value) { return strip_tags($value['label']); }, $tab['values']); @endphp @if ($title)

{{ $title }}

@endif
    @foreach ($labels as $index => $label)
  • @include('partials.doughnut-circle-icon', ["color" => $colors[$index]])
    {{ $label }}
    {{ $values[$index] }}%
  • @endforeach
@if ($caption)
{!! $caption !!}
@endif
@endforeach {{-- END TAB CONTENT --}}
@if ($subscript)
{!! $subscript !!}
@endif