%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home1/dimen328/libertysa.com.br/admin/media/js/relatorio/
Upload File :
Create Path :
Current File : //home1/dimen328/libertysa.com.br/admin/media/js/relatorio/banners_rel.js

(function() {

    options = {
		chart: {
            type: 'column'
       },
       title: {
            text: 'Acesso do Dia',
            x: -20 //center
        },
        subtitle: {
            text: 'Fonte: ',
            x: -20
        },
        xAxis: {
            categories: []
        },
        yAxis: {
            title: {
                text: 'Quantidade de Acesso'
            },
            plotLines: [{
                value: 0,
                width: 1,
                color: '#808080'
            }]
        },
        tooltip: {
            valueSuffix: ''
        }, 
        legend: {
           adjustChartSize: true
        },
        series: []
    };
	
	$.ajax({
			url: "modules/banners/CTRL.php",
			type: 'POST',
			data: { oper: "9"},
			complete: function (e, xhr, result) {
				if (e.readyState == 4 && e.status == 200) {
	 
					try { 
						var Obj = eval("(" + e.responseText + ")"); //Combo OS
					}
					catch (err) {
					}
					
					if(Obj != null){
						if(Obj.length == 0){
							// $("#panel-body").hide();
							$('#container').highcharts({
								chart: {
									plotBackgroundColor: null,
									plotBorderWidth: null,
									plotShadow: false
								},
								title: {
									text: 'Ops, hoje ainda não teve acesso!'
								},
								series: [{
									type: 'pie',
									name: 'Random data',
									data: []
								}]
							});
						}else{
							for(i=0;i < Obj.length;i++){
								var data;
								var hora;
								var datastr;

								data = Obj[i].data.split(" ")[0].split("-");
								hora = Obj[i].data.split(" ")[1].split(":");
								
								datastr = data[2] + "/" + data[1] + "/" + data[0];
								horastr = hora[0] + ":" + hora[1] + ":" + hora[2].split(".")[0];
								
								options.xAxis.categories.push(datastr);
									var grafico = new Object();
									grafico.name = Obj[i].descricao;
									grafico.data = [];
									
									grafico.data.push(Obj[i].acesso);
									options.series.push(grafico);
							}
							
							$('#container').highcharts(options);
						}
					}
				}
			}
		});
								 
		
})();


Zerion Mini Shell 1.0