I have the following code
<?php
if(isset($_GET['mod']))
{
require_once 'PSController.php';
$fecha_actual = date("d-m-Y");
$fecha = date("d-m-Y",strtotime($fecha_actual."- 1 days"));
$ps = new PSController();
$PDP_ContextImprimir = $ps->PDP_ContextImprimir();
}
?>
<h2 class="text-center">Reportes <?php echo $fecha; ?></h2>
<!-- GRAFICOS !-->
<div class="col-md-5">
<div id="grafico1">
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/series-label.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script src="https://code.highcharts.com/modules/export-data.js"></script>
<script type="text/javascript">
chartCPU = new Highcharts.chart('grafico1',
{
chart: {
type: 'line'
},
title: {
text: 'PDP Context 3G'
},
xAxis: {
gridLineWidth: 1,
categories:
[
<?php
foreach($PDP_ContextImprimir['LABEL'] as $hora)
{
echo "'$hora',";
}
?>
]
},
yAxis:
[
{
min: 0,
title:
{
text: '',
}
},
{
min: 0,
max: 100,
title:
{
text: '',
},
opposite: true
}
],
plotOptions: {
column: {
pointPadding: 0.2,
borderWidth: 0
}
},
credits: {
enabled: false
},
tooltip: {
split: true
},
series:
[
{
name: 'RATE',
yAxis: 1,
data:
[
<?php
for ($j=0; $j < count($PDP_ContextImprimir['SUCC_RATE']) ; $j++)
{
echo $PDP_ContextImprimir['SUCC_RATE'][$j].',';
}
?>
],
cursor: 'pointer'
},{
name: 'REQUEST',
yAxis: 0,
data:
[
<?php
for ($k=0; $k < count($PDP_ContextImprimir['REQUEST']) ; $k++)
{
echo $PDP_ContextImprimir['REQUEST'][$k].',';
}
?>
],
cursor: 'pointer'
},{
name: 'SUCCESS',
yAxis: 0,
data:
[
<?php
for ($p=0; $p < count($PDP_ContextImprimir['SUCCESS']) ; $p++)
{
echo $PDP_ContextImprimir['SUCCESS'][$p].',';
}
?>
],
cursor: 'pointer'
}
]
});
</script>
</div>
</div>
<!-- END GRAFICOS !-->
I want to do it is to print that page with body onload="window.print ();" I can print it but it does not show me the lines of the graphic and if I keep the onload="window.print ();" the graphic is fine with its perfect lines