fixed pdf

Former-commit-id: e220052501d8f1b4c3d8f392cc9665876671e7ae
This commit is contained in:
daniel 2019-02-18 16:34:48 +01:00
parent e00ae31862
commit 43ddd9d482
2 changed files with 8 additions and 12 deletions

View File

@ -88,16 +88,13 @@ if (file_exists('languages/'.$user_language.'.mo')) {
$params['menu'] = false;
if ((!isset($params['width']) || ($params['width'] <= 0))) {
$params['width'] = 1048;
$params['width'] = 650;
}
$params_combined = json_decode($_REQUEST['data_combined'], true);
$module_list = json_decode($_REQUEST['data_module_list'], true);
$type_graph_pdf = $_REQUEST['type_graph_pdf'];
$aux_font_size = $config['font_size'];
$config['font_size'] = ($config['font_size'] + 3);
echo '<div>';
switch ($type_graph_pdf) {
case 'combined':
@ -216,7 +213,6 @@ if (file_exists('languages/'.$user_language.'.mo')) {
echo '</div>';
$config['font_size'] = $aux_font_size;
?>
<script type="text/javascript">

View File

@ -245,7 +245,9 @@ function grafico_modulo_sparse_data(
}
}
if ($array_data === false || (!$params['graph_combined'] && !isset($array_data['sum1']['data'][0][1]))) {
if ($array_data === false || (!$params['graph_combined']
&& !isset($array_data['sum1']['data'][0][1]) && !$params['baseline'])
) {
return false;
}
@ -4918,21 +4920,19 @@ function get_baseline_data($agent_module_id, $date_array, $data_module_graph, $p
$period = $date_array['period'];
$date = $date_array['final_date'];
$array_data = [];
for ($i = 0; $i < 4; $i++) {
$date_array = [];
$date_array['period'] = $period;
$date_array['final_date'] = ($date - $period * $i);
$date_array['start_date'] = ($date - $period * ($i + 1));
$data = grafico_modulo_sparse_data(
$date_array['final_date'] = ($date - ($period * $i));
$date_array['start_date'] = ($date - ($period * ($i + 1)));
$array_data[] = grafico_modulo_sparse_data(
$agent_module_id,
$date_array,
$data_module_graph,
$params,
$i
);
$array_data[] = $data;
}
$result = [];