예제 #1
0
<?php

include '../class/Graficos.class.php';
include '../class/lib/PHPLot/phplot.php';
$cand = new Graficos();
$data = $cand->total_bens();
?>

<table border="1">
	<tr>
		<td><b>Nome do bem</b></td>
		<td><b>Total</b></td>
	</tr>
	<?php 
foreach ($data as $d) {
    ?>
	<tr>
		<td><?php 
    echo $d[0];
    ?>
</td>
		<td><?php 
    echo $d[1];
    ?>
</td>
	</tr>
	<?php 
}
?>
</table>
예제 #2
0
<?php

include '../class/Graficos.class.php';
include '../class/lib/PHPLot/phplot.php';
$cand = new Graficos();
$data = $cand->partidos_candidatos();
$plot = new PHPlot(1000, 600);
$plot->SetImageBorderType('plain');
$plot->SetPlotType('pie');
$plot->SetDataType('text-data-single');
$plot->SetDataValues($data);
# Main plot title:
$plot->SetTitle('Total de candidatos de cada partido');
foreach ($data as $row) {
    $plot->SetLegend(implode(': ', $row));
}
$plot->DrawGraph();
예제 #3
0
<?php

include '../class/Graficos.class.php';
include '../class/lib/PHPLot/phplot.php';
$cand = new Graficos();
$data = $cand->cargo_bens();
$plot = new PHPlot(800, 600);
$plot->SetImageBorderType('plain');
$plot->SetPlotType('bars');
$plot->SetDataType('text-data');
$plot->SetDataValues($data);
# Main plot title:
$plot->SetTitle('Média de bens dos candidatos por cargo');
# Make a legend for the 3 data sets plotted:
//$plot->SetLegend(array('Engineering', 'Manufacturing', 'Administration'));
# Turn off X tick labels and ticks because they don't apply here:
$plot->SetXTickLabelPos('none');
$plot->SetXTickPos('none');
$plot->DrawGraph();
예제 #4
0
<?php

include '../class/Graficos.class.php';
include '../class/lib/PHPLot/phplot.php';
$cand = new Graficos();
$data = $cand->partidos_bens();
$plot = new PHPlot(800, 600);
$plot->SetImageBorderType('plain');
$plot->SetPlotType('bars');
$plot->SetDataType('text-data');
$plot->SetDataValues($data);
# Main plot title:
$plot->SetTitle('Total de bens dos candidatos por partido');
# Make a legend for the 3 data sets plotted:
//$plot->SetLegend(array('Engineering', 'Manufacturing', 'Administration'));
# Turn off X tick labels and ticks because they don't apply here:
$plot->SetXTickLabelPos('none');
$plot->SetXTickPos('none');
$plot->DrawGraph();
예제 #5
0
<?php

include '../class/Graficos.class.php';
include '../class/lib/PHPLot/phplot.php';
$cand = new Graficos();
$data = $cand->candidatos_estado();
$plot = new PHPlot(1000, 600);
$plot->SetImageBorderType('plain');
$plot->SetPlotType('pie');
$plot->SetDataType('text-data-single');
$plot->SetDataValues($data);
# Main plot title:
$plot->SetTitle('Total de candidatos em cada Estado');
foreach ($data as $row) {
    $plot->SetLegend(implode(': ', $row));
}
$plot->DrawGraph();