@php use Filament\Support\Facades\FilamentAsset; use Filament\Support\View\ComponentAttributeBag as FilamentComponentAttributeBag; use Filament\Widgets\View\Components\ChartWidgetComponent; use Illuminate\Contracts\Support\Htmlable; $color = $this->getColor(); $heading = $this->getHeading(); $description = $this->getDescription(); $filters = $this->getFilters(); $isCollapsible = $this->isCollapsible(); $type = $this->getType(); $maxHeight = $this->getMaxHeight(); $hasMaxHeight = filled($maxHeight) && $maxHeight !== '100%'; $isEmpty = $this->isEmpty(); $chartAssistiveContent = $isEmpty ? null : $this->getChartAssistiveContent(); $hasChartAssistiveContent = is_string($chartAssistiveContent) ? filled($chartAssistiveContent) : ($chartAssistiveContent !== null); // The chart paints onto a ``, which exposes no internal structure, so build an accessible // name from the widget's heading and description for the surrounding `role="img"` element. $chartAccessibleLabel = trim(implode('. ', array_filter([ $heading instanceof Htmlable ? strip_tags($heading->toHtml()) : $heading, $description instanceof Htmlable ? strip_tags($description->toHtml()) : $description, ], fn ($value): bool => filled($value)))); @endphp @if ($filters || method_exists($this, 'getFiltersSchema')) @if ($filters) @foreach ($filters as $value => $label) @endforeach @endif @if (method_exists($this, 'getFiltersSchema')) {{ $this->getFiltersTriggerAction() }}
{{ $this->getFiltersSchema() }} @if (method_exists($this, 'hasDeferredFilters') && $this->hasDeferredFilters())
{{ $this->getFiltersApplyAction() }} {{ $this->getFiltersResetAction() }}
@endif
@endif
@endif
getPollingInterval()) wire:poll.{{ $pollingInterval }}="updateChartData" @endif @if ($isEmpty) style="display: none" @endif > @if ($hasChartAssistiveContent)
@if (is_string($chartAssistiveContent))

{{ $chartAssistiveContent }}

@else {{ $chartAssistiveContent }} @endif
@endif
@if ($isEmpty) @if ($emptyState = $this->getEmptyState()) {{ $emptyState }} @else
$hasMaxHeight, ]) @style([ ('min-height: ' . e($maxHeight)) => $hasMaxHeight, ]) > @if ($emptyStateActions = $this->getEmptyStateActions()) @endif
@endif @endif