|
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
session_start();
|
|
|
|
|
require("jpgraph/jpgraph.php");
|
|
|
|
|
require("jpgraph/jpgraph_bar.php");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!isset($_SESSION["SSdataGraphBar"]))
|
|
|
|
|
exit;
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Array contem os dados da espera.
|
|
|
|
|
*/
|
|
|
|
|
$data = $_SESSION["SSdataGraphBar"];
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Labels para o gr<EFBFBD>fico.
|
|
|
|
|
*/
|
|
|
|
|
$arLabel = array('TE<=10', '10<TE<=20', '20<TE<=30', '30<TE<=60', '60<TE<=120', '120<TE<=180', '180<TE<=300', '300<TE');
|
|
|
|
|
$labelX = sprintf('Fila: %s Per<EFBFBD>odo: %s at<EFBFBD> %s Emitido Por: %s', $_SESSION["SSnomeDac"], $_SESSION["dataIni"], $_SESSION["dataFim"], $_SESSION["SSlogin"]);
|
|
|
|
|
$labelX .= str_repeat(' ', 134 - strlen($labelX));
|
|
|
|
|
/*
|
|
|
|
|
* Cria o gr<EFBFBD>fico.
|
|
|
|
|
*/
|
|
|
|
|
$graph = new Graph(800, 500);
|
|
|
|
|
$graph->SetScale("textint");
|
|
|
|
|
$graph->SetShadow();
|
|
|
|
|
$graph->SetMargin(40, 20, 40, 40);
|
|
|
|
|
$graph->title->Set('Chamadas Abandonadas por Tempo de Espera');
|
|
|
|
|
$graph->xaxis->SetTickLabels($arLabel);
|
|
|
|
|
$graph->legend->Pos(0.2, 0.90);
|
|
|
|
|
$graph->legend->SetColumns(1);
|
|
|
|
|
$graph->xaxis->title->Set($labelX);
|
|
|
|
|
$graph->yaxis->title->Set('Chamadas');
|
|
|
|
|
|
|
|
|
|
$barPlot1 = new BarPlot($data);
|
|
|
|
|
$gpBarPlot = new AccBarPlot(array($barPlot1));
|
|
|
|
|
$gpBarPlot->SetWidth(0.3);
|
|
|
|
|
$graph->Add($gpBarPlot);
|
|
|
|
|
|
|
|
|
|
$barPlot1->SetFillColor("dodgerblue");
|
|
|
|
|
$barPlot1->value->Show();
|
|
|
|
|
$barPlot1->value->SetFormat("%d");
|
|
|
|
|
$barPlot1->value->SetColor("black");
|
|
|
|
|
|
|
|
|
|
$graph->Stroke();
|
|
|
|
|
exit;
|
|
|
|
|
|
|
|
|
|
|