-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconsumo-lista-report.php
executable file
·42 lines (34 loc) · 1.09 KB
/
consumo-lista-report.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
date_default_timezone_set('Brazil/East');
include 'conecta.php';
include 'consumo-banco.php';
include 'report-cabecalho.php';
include 'report-variaveis.php';
include 'report-listagem.php';
include 'report-totalizadores.php';
include 'report-rodape.php';
?>
<script src="js/funcoes/report.js"></script>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript">
google.charts.load('current', {'packages':['corechart']});
google.charts.setOnLoadCallback(drawChart);
function drawChart()
{
var data = google.visualization.arrayToDataTable([
['Dia da Semana', 'Qtd Café'],
<?php include 'report-imprime-dados-chart.php'; ?>
]);
var options = {
title: 'Cafés bebidos por dia da semana',
is3D: true,
};
var chart_area = document.getElementById('piechart');
var chart = new google.visualization.PieChart(chart_area);
google.visualization.events.addListener(chart, 'ready', function()
{
chart_area.innerHTML = '<img src="' + chart.getImageURI() + '">';
});
chart.draw(data, options);
}
</script>