@php $graphName = (isset($name) && $name != $uuid) ? $name : ($label ?? ''); $displayName = isset($graphName) && $graphName != ''; $isSmallGauge = !empty($small) && isset($type) && $type === 'gauge'; @endphp @if(isset($type)) @if(!$isSmallGauge && ($graphName != '' || isset($label)))
{{ $label ?? $graphName }}
@endif
@if(str_contains($type, 'progress') && isset($value)) @php $dim = (float)($dimension ?? 200); $p = min(100, max(0, (float)$value)); $bar = 10; $track = 1; $r = max(0, ($dim - $bar) / 2); @endphp
@if($type == 'progress_bar')
{{ round($p, 1) . '%' }}
@else
{{ round($p, 1) . '%' }}
@endif
@else {!! \KFramework\Helpers\ChartHelper::generateChart($type, $schema, $dimension ?? 200, $displayLegend, $horizontalValuesOrientation, $small ?? false) !!} @endif
@endif