Fixed styles legend in custom graphs
This commit is contained in:
parent
f1a083eede
commit
76a7b7102c
|
@ -1196,7 +1196,7 @@ function graphic_combined_module ($module_list, $weight_list, $period,
|
|||
$module_name = io_safe_output(
|
||||
modules_get_agentmodule_name ($agent_module_id));
|
||||
|
||||
$module_name_list[$i] = $agent_name ." / ". $module_name;
|
||||
$module_name_list[$i] = '<span style=\"font-size:' . ($config['font_size']) . 'pt;font-family: smallfontFont;\" >' . $agent_name . " / " . $module_name. '</span>';
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@ -1214,9 +1214,9 @@ function graphic_combined_module ($module_list, $weight_list, $period,
|
|||
$module_name = ui_print_truncate_text($module_name, 'module_small', false, true, false, '...', false);
|
||||
|
||||
if ($labels[$agent_module_id] != '')
|
||||
$module_name_list[$i] = $labels[$agent_module_id];
|
||||
$module_name_list[$i] = '<span style=\"font-size:' . ($config['font_size']) . 'pt;font-family: smallfontFont;\" >' . $labels[$agent_module_id] . '</span>';
|
||||
else
|
||||
$module_name_list[$i] = $agent_name . ' / ' . $module_name;
|
||||
$module_name_list[$i] = '<span style=\"font-size:' . ($config['font_size']) . 'pt;font-family: smallfontFont;\" >' . $agent_name . ' / ' . $module_name . '</span>';
|
||||
}
|
||||
|
||||
// Data iterator
|
||||
|
@ -1746,7 +1746,7 @@ function graphic_combined_module ($module_list, $weight_list, $period,
|
|||
|
||||
|
||||
//Work around for fixed the agents name with huge size chars.
|
||||
$fixed_font_size = $config['font_size'];
|
||||
$fixed_font_size = $config['font_size'] - 2;
|
||||
|
||||
//Set graph color
|
||||
|
||||
|
|
|
@ -1733,13 +1733,13 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend,
|
|||
$('#timestamp_'+graph_id).hide();
|
||||
}
|
||||
|
||||
var label_aux = series.label + ' = ';
|
||||
var label_aux = series.label;
|
||||
|
||||
// The graphs of points type and unknown graphs will dont be updated
|
||||
if (serie_types[i] != 'points' && series.label != $('#hidden-unknown_text').val()) {
|
||||
$('#legend_' + graph_id + ' .legendLabel')
|
||||
.eq(i).text(label_aux.replace(/=.*/,
|
||||
'= ' + parseFloat(y).toFixed(precision_graph) + ' ' + unit));
|
||||
.eq(i).html(label_aux + '= ' + parseFloat(y).toFixed(2) + ' ' + unit);
|
||||
console.log($('#legend_' + graph_id + ' .legendLabel'));
|
||||
}
|
||||
|
||||
$('#legend_' + graph_id + ' .legendLabel')
|
||||
|
@ -1842,8 +1842,10 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend,
|
|||
$('#timestamp_'+graph_id).hide();
|
||||
dataset = plot.getData();
|
||||
for (i = 0; i < dataset.length; ++i) {
|
||||
var series = dataset[i];
|
||||
var label_aux = series.label;
|
||||
$('#legend_' + graph_id + ' .legendLabel')
|
||||
.eq(i).text(legends.eq(i).text().replace(/=.*/, ''));
|
||||
.eq(i).html(label_aux);
|
||||
}
|
||||
plot.clearCrosshair();
|
||||
overview.clearCrosshair();
|
||||
|
|
Loading…
Reference in New Issue