<?php
session_start();
date_default_timezone_set('America/Lima');
$script_tz = date_default_timezone_get();
@$xs_empresa=$_SESSION['s_empresa'];

//$n = $_REQUEST['n'];

$arr_prod = $_SESSION['arr_prod']; 
$arr_mont = $_SESSION['arr_mont']; 	
//print_r($arr_dia);
//print_r($arr_mont);
?>

<script language="javascript">
let arr_prod = <?php echo json_encode($arr_prod, JSON_PRETTY_PRINT); ?>;
let arr_mont = <?php echo json_encode($arr_mont, JSON_PRETTY_PRINT); ?>;
</script>


<!DOCTYPE html>
<html lang="es">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Graficos</title>
</head>
<body>
<h1 align="center" style="font-family:Arial, Helvetica, sans-serif; font-size:18px; color:#666666;"></h1>
<!-- div style="width:1000px;" -->
<canvas id="myChart1" ></canvas>
<!-- /div -->
<br>
<script src="chart.js"></script>
<script>


var ctx1 = document.getElementById('myChart1').getContext('2d');
var chart = new Chart(ctx1, {
    //type: 'line',
	type: 'bar',
	//type: 'horizontalBar',	
	//type: 'doughnut',
	//type: 'pie',
    data: {
        labels: arr_prod,
        datasets: [{
            label: 'Monto de Venta',
            backgroundColor: '#FFCC00',
            borderColor: '#CC3300',
            data: arr_mont
        }		
		]},		
    options: {}
});


/*
var ctx1 = document.getElementById('myChart1').getContext('2d');
var chart = new Chart(ctx1, {
    type: 'doughnut',
    data: 	
	{
				datasets: [{
					 data: arr_mont,
					backgroundColor: ['#42a5f5', 'red', 'green','blue','violet'],
					label: 'Comparacion de navegadores'
				}],
				labels: arr_prod
				},
    options: {}
});
*/


</script>
</body>
</html>    