fixed error labels graphs and weight in chart
Former-commit-id: 52acfda4438417b711295ce8d335ea2748b1fa53
This commit is contained in:
parent
545afcb684
commit
3fcd854ae6
|
@ -3546,9 +3546,11 @@ function series_type_graph_array($data, $show_elements_graph)
|
|||
&& (count($show_elements_graph['labels']) > 0)
|
||||
) {
|
||||
if ($show_elements_graph['unit']) {
|
||||
$name_legend = $data_return['legend'][$key] = $value['agent_alias'].' / '.$value['module_name'].' / '.__('Unit ').' '.$show_elements_graph['unit'].': ';
|
||||
$name_legend = $show_elements_graph['labels'][$value['agent_module_id']].' / '.__('Unit ').' '.$show_elements_graph['unit'].': ';
|
||||
$data_return['legend'][$key] = $show_elements_graph['labels'][$value['agent_module_id']].' / '.__('Unit ').' '.$show_elements_graph['unit'].': ';
|
||||
} else {
|
||||
$name_legend = $data_return['legend'][$key] = $value['agent_alias'].' / '.$value['module_name'].': ';
|
||||
$name_legend = $show_elements_graph['labels'][$value['agent_module_id']].': ';
|
||||
$data_return['legend'][$key] = $show_elements_graph['labels'][$value['agent_module_id']].': ';
|
||||
}
|
||||
} else {
|
||||
if (strpos($key, 'baseline') !== false) {
|
||||
|
|
|
@ -1358,7 +1358,7 @@ function graphic_combined_module(
|
|||
$data_module_graph['c_inv'] = $module_data['critical_inverse'];
|
||||
$data_module_graph['module_id'] = $agent_module_id;
|
||||
|
||||
// stract data
|
||||
// Stract data.
|
||||
$array_data_module = grafico_modulo_sparse_data(
|
||||
$agent_module_id,
|
||||
$date_array,
|
||||
|
@ -1369,15 +1369,17 @@ function graphic_combined_module(
|
|||
|
||||
$series_suffix = $i;
|
||||
|
||||
// convert to array graph and weight
|
||||
// Convert to array graph and weight.
|
||||
foreach ($array_data_module as $key => $value) {
|
||||
$array_data[$key] = $value;
|
||||
if ($params_combined['weight_list'][$i] > 1) {
|
||||
if ($params_combined['weight_list'][$i] != 1) {
|
||||
foreach ($value['data'] as $k => $v) {
|
||||
if ($v[1] != false) {
|
||||
$array_data[$key]['data'][$k][1] = ($v[1] * $params_combined['weight_list'][$i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$max = $array_data['sum'.$i]['max'];
|
||||
$min = $array_data['sum'.$i]['min'];
|
||||
|
|
Loading…
Reference in New Issue