Sindbad~EG File Manager

Current Path : /var/www/html/eddcfa.sumar.com.py_old/resources/views/livewire/
Upload File :
Current File : /var/www/html/eddcfa.sumar.com.py_old/resources/views/livewire/graficoshow.blade.php

<div>
<div class="card">
		<div class="card-body">
		    <table class="table table-bordered">
		        <thead>
		            <tr>
		                <th>Nombre y Apellido</th>
		                <th>Evaluación</th>
		                <th>Periodo</th>
                        <th>Promedio General</th>
		            </tr>
		        </thead>
		        <tbody>
		            @foreach($asignaciones as $value)
                        <tr>
                            <td>{{ $value->evaluado }}</td>
                            <td>{{ $value->evaluacion }}</td>
                            <td>{{date('d/m/Y', strtotime($datos[$value->id]['fecha']))}}</td>
                            <td>{{$datos[$value->id]['promedio']}}%</td>
                        </tr>
		            @endforeach
		        </tbody>
		    </table>
			<div class="col-md-12" align="center"><hr>
				<h3 class="box-title">Gráfico de progreso</h3><hr>
				<div class="chart">
					<canvas id="barChart" style="height:230px"></canvas>
				</div>
			</div>
		</div>
    </div>
    <div class="col-12">
        @if($asignaciones->count())
	        	
	    @else
	        	No hay resultados para mostrar
	    @endif
    </div>

	@section('adminlte_js')
		<script>
			var speedCanvas = document.getElementById("barChart");

			@php $colores = ['#AB2626', '#5D47D4', '#EF9C4D', '#CFCA37']; @endphp
			
			var dato = {
				label: '<?= $nombre ?>',
				data: [
					@foreach($datos as $data)
						'<?= $data['promedio'] ?>',
					@endforeach
				],
				borderColor: '<?= $colores[1] ?>'
			};
			
			var speedData = {
				labels: [
					@foreach($datos as $data)
						'<?= date('d/m/Y', strtotime($data['fecha'])) ?>',
					@endforeach
				],
				datasets: [dato]
			};

			var chartOptions = {
				responsive              : true,
				maintainAspectRatio     : false,
				datasetFill             : false
			};

			var lineChart = new Chart(speedCanvas, {
				type: 'line',
				data: speedData,
				options: chartOptions
			});
		</script>
	@stop
</div>

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists