<h3 class="text-center" style="margin:30px 0px 30px;">Статистика затраченного времени</h3>

<div class="chart-container" style="position: relative; height:40vh; width:100%; margin-bottom:20px;">
	<canvas id="TaskTime10age"></canvas>
</div>
<script>
var ctxtasktime10age = document.getElementById("TaskTime10age").getContext('2d');
var TaskTime10age = new Chart(ctxtasktime10age, {
	type: 'line',
	data: {
		labels: ["<?php echo date("Y",strtotime("- 4 years")); ?>", "<?php echo date("Y",strtotime("- 3 years")); ?>", "<?php echo date("Y",strtotime("- 2 years")); ?>", "<?php echo date("Y",strtotime("- 1 years")); ?>", "<?php echo date("Y"); ?>"],
		datasets: [{
			label: 'Время на задачу, дн.',
			stack: 'Stack 0',
			data: [<?php echo tasks_time_year_diff('4'); ?>, <?php echo tasks_time_year_diff('3'); ?>, <?php echo tasks_time_year_diff('2'); ?>, <?php echo tasks_time_year_diff('1'); ?>, <?php echo tasks_time_year_diff('0'); ?>],
			backgroundColor: [ 'rgba(212,219,89, 0.25)' ],
			borderColor: 'rgba(212,219,89, 1.0)',
			borderWidth: 2,
			tension: 0,
			pointStyle: 'circle',
			pointRadius: 3,
			pointBackgroundColor: 'rgba(212,219,89, 1.0)'
		}]
	},
	options: {
		scales: {
			yAxes: [{
				ticks: {
					beginAtZero:true
				}
			}]
		},
		responsive: true,
		maintainAspectRatio: false,
		legend: {
			display: false
		}
	}
});
</script>