{{-- Question has graph? --}} @if (!empty($question->has_graph) && !is_null($question->graph)) @php $dataChart = json_decode($question->graph->data, true); $dataChart = is_array($dataChart) ? $dataChart : []; $chart_count = count($dataChart["datasets"]); $chart_type = $question->graph->type; @endphp @if($chart_type=="pie") @for($i=0;$i<$chart_count;$i++) @if($chart_count==1)