Fixed problems with bullet charts. Tiquet: #3822

This commit is contained in:
m-lopez-f 2016-07-21 11:07:09 +02:00
parent 517cf4c1a3
commit 72f8881685

View File

@ -1401,7 +1401,7 @@ function graphic_combined_module ($module_list, $weight_list, $period,
$flash_charts = false; $flash_charts = false;
} }
if ($flash_charts === false && $stacked == CUSTOM_GRAPH_GAUGE) if ($flash_charts === false && $stacked == CUSTOM_GRAPH_GAUGE)
$stacked = CUSTOM_GRAPH_BULLET_CHART; $stacked = CUSTOM_GRAPH_BULLET_CHART;
switch ($stacked) { switch ($stacked) {
@ -1425,7 +1425,10 @@ function graphic_combined_module ($module_list, $weight_list, $period,
$value = count($value); $value = count($value);
} }
else { else {
$value = false; if ($flash_charts === false)
$value = 0;
else
$value = false;
} }
@ -1436,8 +1439,14 @@ function graphic_combined_module ($module_list, $weight_list, $period,
$temp[$module]['label'] = $label; $temp[$module]['label'] = $label;
$temp[$module]['value'] = $value; $temp[$module]['value'] = $value;
$temp[$module]['max'] = reporting_get_agentmodule_data_max($module,$period,$date); $temp_max = reporting_get_agentmodule_data_max($module,$period,$date);
$temp[$module]['min'] = reporting_get_agentmodule_data_min($module,$period,$date); if ($temp_max < 0)
$temp_max = 0;
$temp[$module]['max'] = ($temp_max === false) ? 0 : $temp_max;
$temp_min = reporting_get_agentmodule_data_min($module,$period,$date);
if ($temp_min < 0)
$temp_min = 0;
$temp[$module]['min'] = ($temp_min === false) ? 0 : $temp_min;
} }
break; break;
case CUSTOM_GRAPH_HBARS: case CUSTOM_GRAPH_HBARS: