PABX da Simples IP
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

49 lines
1.2 KiB

<?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á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íodo: %s até %s Emitido Por: %s', $_SESSION["SSnomeDac"], $_SESSION["dataIni"], $_SESSION["dataFim"], $_SESSION["SSlogin"]);
$labelX .= str_repeat(' ', 134 - strlen($labelX));
/*
* Cria o grá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;