fixed errors in graphs
This commit is contained in:
parent
f9eb762951
commit
40ee2cce0a
Binary file not shown.
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.1 KiB |
|
@ -755,12 +755,12 @@ function grafico_modulo_sparse_data ($agent_module_id, $period, $show_events,
|
|||
. __('Avg') . ': ' . remove_right_zeros(number_format($graph_stats['sum']['avg'], $config['graph_precision'])) . ($unit ? ' ' . $unit : '');
|
||||
}
|
||||
else if (!$avg_only) {
|
||||
$legend['max'.$series_suffix] = __('Max').$series_suffix_str.': '.__('Last').': '.remove_right_zeros(number_format($graph_stats['max']['last'], $config['graph_precision'])).' '.$unit.' ; '.__('Avg').': '.remove_right_zeros(number_format($graph_stats['max']['avg'], $config['graph_precision'])).' '.$unit.' ; '.__('Max').': '.remove_right_zeros(number_format($graph_stats['max']['max'], $config['graph_precision'])).' '.$unit.' ; '.__('Min').': '.remove_right_zeros(number_format($graph_stats['max']['min'], $config['graph_precision'])).' '.$unit;
|
||||
$legend['sum'.$series_suffix] = __('Avg').$series_suffix_str.': '.__('Last').': '.remove_right_zeros(number_format($graph_stats['sum']['last'], $config['graph_precision'])).' '.$unit.' ; '.__('Avg').': '.remove_right_zeros(number_format($graph_stats['sum']['avg'], $config['graph_precision'])).' '.$unit.' ; '.__('Max').': '.remove_right_zeros(number_format($graph_stats['sum']['max'], $config['graph_precision'])).' '.$unit.' ; '.__('Min').': '.remove_right_zeros(number_format($graph_stats['sum']['min'], $config['graph_precision'])).' '.$unit;
|
||||
$legend['min'.$series_suffix] = __('Min').$series_suffix_str.': '.__('Last').': '.remove_right_zeros(number_format($graph_stats['min']['last'], $config['graph_precision'])).' '.$unit.' ; '.__('Avg').': '.remove_right_zeros(number_format($graph_stats['min']['avg'], $config['graph_precision'])).' '.$unit.' ; '.__('Max').': '.remove_right_zeros(number_format($graph_stats['min']['max'], $config['graph_precision'])).' '.$unit.' ; '.__('Min').': '.remove_right_zeros(number_format($graph_stats['min']['min'], $config['graph_precision'])).' '.$unit;
|
||||
$legend['max'.$series_suffix] = __('Max').$series_suffix_str.': '.__('Avg').': '.remove_right_zeros(number_format($graph_stats['max']['avg'], $config['graph_precision'])).' '.$unit.' ; '.__('Max').': '.remove_right_zeros(number_format($graph_stats['max']['max'], $config['graph_precision'])).' '.$unit.' ; '.__('Min').': '.remove_right_zeros(number_format($graph_stats['max']['min'], $config['graph_precision'])).' '.$unit;
|
||||
$legend['sum'.$series_suffix] = __('Avg').$series_suffix_str.': '.__('Avg').': '.remove_right_zeros(number_format($graph_stats['sum']['avg'], $config['graph_precision'])).' '.$unit.' ; '.__('Max').': '.remove_right_zeros(number_format($graph_stats['sum']['max'], $config['graph_precision'])).' '.$unit.' ; '.__('Min').': '.remove_right_zeros(number_format($graph_stats['sum']['min'], $config['graph_precision'])).' '.$unit;
|
||||
$legend['min'.$series_suffix] = __('Min').$series_suffix_str.': '.__('Avg').': '.remove_right_zeros(number_format($graph_stats['min']['avg'], $config['graph_precision'])).' '.$unit.' ; '.__('Max').': '.remove_right_zeros(number_format($graph_stats['min']['max'], $config['graph_precision'])).' '.$unit.' ; '.__('Min').': '.remove_right_zeros(number_format($graph_stats['min']['min'], $config['graph_precision'])).' '.$unit;
|
||||
}
|
||||
else {
|
||||
$legend['sum'.$series_suffix] = __('Avg').$series_suffix_str.': '.__('Last').': '.remove_right_zeros(number_format($graph_stats['sum']['last'], $config['graph_precision'])).' '.$unit.' ; '.__('Avg').': '.remove_right_zeros(number_format($graph_stats['sum']['avg'], $config['graph_precision'])).' '.$unit.' ; '.__('Max').': '.remove_right_zeros(number_format($graph_stats['sum']['max'], $config['graph_precision'])).' '.$unit.' ; '.__('Min').': '.remove_right_zeros(number_format($graph_stats['sum']['min'], $config['graph_precision'])).' '.$unit;
|
||||
$legend['sum'.$series_suffix] = __('Avg').$series_suffix_str.': '.__('Avg').': '.remove_right_zeros(number_format($graph_stats['sum']['avg'], $config['graph_precision'])).' '.$unit.' ; '.__('Max').': '.remove_right_zeros(number_format($graph_stats['sum']['max'], $config['graph_precision'])).' '.$unit.' ; '.__('Min').': '.remove_right_zeros(number_format($graph_stats['sum']['min'], $config['graph_precision'])).' '.$unit;
|
||||
}
|
||||
//Baseline was replaced by compare graph feature
|
||||
/*if ($baseline) {
|
||||
|
|
|
@ -1537,7 +1537,7 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend,
|
|||
hoverable: true,
|
||||
clickable: true,
|
||||
borderWidth:1,
|
||||
borderColor: '#666',
|
||||
borderColor: '#C1C1C1',
|
||||
tickColor: background_color,
|
||||
markings: markings,
|
||||
color: legend_color
|
||||
|
@ -2198,10 +2198,10 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend,
|
|||
set_watermark(graph_id, plot, $('#watermark_image_'+graph_id).attr('src'));
|
||||
}
|
||||
|
||||
adjust_menu(graph_id, plot, parent_height);
|
||||
adjust_menu(graph_id, plot, parent_height, width);
|
||||
}
|
||||
|
||||
function adjust_menu(graph_id, plot, parent_height) {
|
||||
function adjust_menu(graph_id, plot, parent_height, width) {
|
||||
if ($('#'+graph_id+' .xAxis .tickLabel').eq(0).css('width') != undefined) {
|
||||
left_ticks_width = $('#'+graph_id+' .xAxis .tickLabel').eq(0).css('width').split('px')[0];
|
||||
}
|
||||
|
@ -2234,7 +2234,7 @@ function adjust_menu(graph_id, plot, parent_height) {
|
|||
//$('#legend_' + graph_id).css('width',plot.width());
|
||||
|
||||
$('#menu_' + graph_id)
|
||||
.css('left',plot.width() - $('#menu_'+graph_id).width() + 10);
|
||||
.css('left',width - $('#menu_'+graph_id).width());
|
||||
$('#menu_' + graph_id).show();
|
||||
}
|
||||
|
||||
|
@ -2251,10 +2251,10 @@ function set_watermark(graph_id, plot, watermark_src) {
|
|||
if ($('#'+graph_id+' .yAxis .tickLabel').eq(0).css('height') != undefined) {
|
||||
down_ticks_height = $('#'+graph_id+' .yAxis .tickLabel').eq(0).css('height').split('px')[0];
|
||||
}
|
||||
//var left_pos = parseInt(context.canvas.width - 3) - $('#watermark_image_'+graph_id)[0].width;
|
||||
//var top_pos = parseInt(context.canvas.height - down_ticks_height - 10) - $('#watermark_image_'+graph_id)[0].height;
|
||||
var left_pos = 380;
|
||||
var left_pos = parseInt(context.canvas.width - 3) - $('#watermark_image_'+graph_id)[0].width;
|
||||
var top_pos = 6;
|
||||
//var top_pos = parseInt(context.canvas.height - down_ticks_height - 10) - $('#watermark_image_'+graph_id)[0].height;
|
||||
//var left_pos = 380;
|
||||
context.drawImage(this, left_pos, top_pos);
|
||||
|
||||
}, false);
|
||||
|
|
|
@ -246,7 +246,6 @@ function flot_area_graph($chart_data, $width, $height, $color, $legend,
|
|||
"style='display: none; " .
|
||||
"text-align: center; " .
|
||||
"width: " . $menu_width . "px; ".
|
||||
"border: solid 1px #666; ".
|
||||
"border-bottom: 0px; " .
|
||||
"padding: 4px 4px 4px 4px;margin-bottom:5px;'>
|
||||
<a href='javascript:'><img id='menu_cancelzoom_$graph_id' src='".$homeurl."images/zoom_cross_grey.disabled.png' alt='".__('Cancel zoom')."' title='".__('Cancel zoom')."'></a>";
|
||||
|
|
Loading…
Reference in New Issue