Fixed element name and leyend separator

This commit is contained in:
Arturo Gonzalez 2017-11-10 14:43:31 +01:00
parent 68a10343fb
commit de65e7cf27
2 changed files with 4 additions and 4 deletions

View File

@ -2583,7 +2583,7 @@ function get_donut_module_data ($id_module) {
$total = 0;
foreach ($values as $val) {
if ($index < $max_elements) {
$data = explode(":", $val);
$data = explode(",", $val);
$values_to_return[$index]['tag_name'] = $data[0] . ", " . $data[1];
$values_to_return[$index]['color'] = $colors[$index];
$values_to_return[$index]['value'] = (int)$data[1];
@ -2591,7 +2591,7 @@ function get_donut_module_data ($id_module) {
$index++;
}
else {
$data = explode(":", $val);
$data = explode(",", $val);
$values_to_return[$index]['tag_name'] = __('Others') . ", " . $data[1];
$values_to_return[$index]['color'] = $colors[$index];
$values_to_return[$index]['value'] += (int)$data[1];
@ -2602,7 +2602,7 @@ function get_donut_module_data ($id_module) {
foreach ($values_to_return as $ind => $donut_data) {
$values_to_return[$ind]['percent'] = ($donut_data['value'] * 100) / $total;
}
return $values_to_return;
}

View File

@ -731,7 +731,7 @@ function visual_map_editor_print_toolbox() {
visual_map_print_button_editor('static_graph', __('Static Graph'), 'left', false, 'camera_min', true);
visual_map_print_button_editor('percentile_item', __('Percentile Item'), 'left', false, 'percentile_item_min', true);
visual_map_print_button_editor('module_graph', __('Module Graph'), 'left', false, 'graph_min', true);
visual_map_print_button_editor('donut_graph', __('Donut Graph'), 'left', false, 'donut_graph_min', true);
visual_map_print_button_editor('donut_graph', __('Serialized pie graph'), 'left', false, 'donut_graph_min', true);
visual_map_print_button_editor('bars_graph', __('Bars Graph'), 'left', false, 'bars_graph_min', true);
visual_map_print_button_editor('auto_sla_graph', __('Auto SLA Graph'), 'left', false, 'auto_sla_graph_min', true);
visual_map_print_button_editor('simple_value', __('Simple Value'), 'left', false, 'binary_min', true);