44 lines
1.8 KiB
PHP
Raw Normal View History

2022-06-01 10:15:55 +03:00
@php $charts = $class->getCharts($table_key); @endphp
<div class="w-full lg:w-6/12 lg:ltr:pl-24 lg:rtl:pr-24">
<div class="relative mb-10" x-data="{ toggle: 'donut' }">
<div class="flex border-b pb-2">
2022-08-05 17:28:16 +03:00
<div class="w-full lg:w-11/12 ltr:text-xl rtl:text-right text-left text-black-400">
2022-06-01 10:15:55 +03:00
<h2 x-show="toggle === 'donut'">{{ trans('general.timeline') }}</h2>
<h2 x-show="toggle === 'bar'">{{ trans('general.distribution') }}</h2>
</div>
2022-08-01 00:07:01 +03:00
<div class="flex items-center bg-gray-200 p-1 rounded-lg">
<button type="button"
class="w-18 flex justify-center px-2"
x-bind:class="toggle === 'donut' ? 'bg-white rounded-lg' : 'btn-outline-primary'"
x-on:click="toggle = 'donut'"
>
<span class="material-icons" title="{{ trans('general.timeline') }}">signal_cellular_alt</span>
</button>
<button type="button"
class="w-18 flex justify-center px-2"
x-bind:class="toggle === 'bar' ? 'bg-white rounded-lg' : 'btn-outline-primary'"
x-on:click="toggle = 'bar'"
>
<span class="material-icons-outlined" title="{{ trans('general.distribution') }}">donut_small</span>
</button>
2022-06-01 10:15:55 +03:00
</div>
</div>
<div x-show="toggle === 'donut'">
{!! $charts['bar']->container() !!}
</div>
2022-06-10 17:39:14 +03:00
<div class="apexcharts-donut-custom apexcharts-donut-custom-report" x-show="toggle === 'bar'">
2022-06-01 10:15:55 +03:00
{!! $charts['donut']->container() !!}
</div>
</div>
</div>
@push('body_scripts')
{!! $charts['bar']->script() !!}
{!! $charts['donut']->script() !!}
@endpush