Hello. I have a highcharts graphic and I need to enable caption with quantity so it makes it easier to preview at the time of printing because the quantity is only showing up when I mouse over and the quantity does not print.
<html>
<head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
<script src='http://code.highcharts.com/highcharts.js' type='text/javascript'> </script>
<script src='http://code.highcharts.com/modules/exporting.js' type='text/javascript'></script>
</head>
<body>
<?php
require 'conecta.php';
mysql_select_db("asteriskcdrdb", $conLigacoes);
$sql = "select distinct case when (dstchannel like '%claro%') then 'Claro' when (dstchannel like '%Tim%') then 'Tim' when (dstchannel like '%Vivo%') then 'Vivo' when (dstchannel like '%Tim%') then 'Tim' when (dstchannel like '%Oi%') then 'Oi' when (dstchannel like '%Nextel%') then 'Nextel' else 'Outras' end as 'Operadora', count(dstchannel) as Quantidade from cdr where (dstchannel regexp 'claro|Tim|vivo|oi|nextel') and calldate between '".$_POST['DataInicial']."' and '".$_POST['DataFinal']."' group by Operadora";
$result1 = mysql_query($sql);
$data1 = array();
$data2 = array();
while ($row = mysql_fetch_array($result1)) {
$data1 = $row['Operadora'];
$data2 = $row['Quantidade'];
$DadosGrafico[] = "['".$data1."',".$data2."]";
}
?>
<script type="text/javascript">
$(function () {
$('#container').highcharts({
chart: {
type: 'pie',
options3d: {
enabled: true,
alpha: 45,
beta: 0
}
},
title: {
text: 'Relatório de Ligações'
},
subtitle: {
text: ''
},
xAxis: {
categories: ['<?php echo join("','", $data1) ?>'],},
yAxis: {
min: 0,
title: {
text: 'Quantidade'
}
},
legend: {
layout: 'vertical',
backgroundColor: '#FFFFFF',
align: 'left',
verticalAlign: 'top',
x: 50,
y: 35,
floating: true,
shadow: true
},
plotOptions: { column: { pointPadding: 0.2, borderWidth: 0 }},
series: [{ name: 'Quantidade', data: [<?php echo join(',',$DadosGrafico ) ?>],
// pointStart: 0
//pointInterval
}
//
]
});
});
</script>
<div id="container" style="min-width: 400px; height: 400px; margin: 0 auto"></div>
</body>
</html>