mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 08:45:12 +02:00
2011-08-30 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/graphs/functions_fsgraph.php, include/graphs/fgraph.php: added the parameter $reduce_data_columns by default false for to use in vertical columns graph. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4850 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
b6adf426b3
commit
5e4e2893b0
@ -1,3 +1,9 @@
|
|||||||
|
2011-08-30 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
|
* include/functions_graph.php, include/graphs/functions_fsgraph.php,
|
||||||
|
include/graphs/fgraph.php: added the parameter $reduce_data_columns by
|
||||||
|
default false for to use in vertical columns graph.
|
||||||
|
|
||||||
2011-08-30 Sergio Martin <sergio.martin@artica.es>
|
2011-08-30 Sergio Martin <sergio.martin@artica.es>
|
||||||
|
|
||||||
* operation/agentes/estado_agente.php: Fixed URL injection replacing
|
* operation/agentes/estado_agente.php: Fixed URL injection replacing
|
||||||
|
@ -2075,18 +2075,10 @@ function grafico_modulo_string ($agent_module_id, $period, $show_events,
|
|||||||
|
|
||||||
$legend = null;
|
$legend = null;
|
||||||
|
|
||||||
//TODO FIX
|
|
||||||
|
|
||||||
return vbar_graph($flash_chart, $chart, $width, $height, $color,
|
return vbar_graph($flash_chart, $chart, $width, $height, $color,
|
||||||
$legend, "", "", $homeurl,
|
$legend, "", "", $homeurl,
|
||||||
$config['homedir'] . "/images/logo_vertical_water.png",
|
$config['homedir'] . "/images/logo_vertical_water.png",
|
||||||
$config['fontpath'], $config['font_size']);
|
$config['fontpath'], $config['font_size'], '', true, 1, true);
|
||||||
|
|
||||||
//old
|
|
||||||
return area_graph($flash_chart, $chart, $width, $height, $color, $legend,
|
|
||||||
$long_index, "images/image_problem.opaque.png", "", "", $homeurl,
|
|
||||||
$config['homedir'] . "/images/logo_vertical_water.png",
|
|
||||||
$config['fontpath'], $config['font_size'], "");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function grafico_modulo_log4x ($id_agente_modulo, $periodo, $show_event,
|
function grafico_modulo_log4x ($id_agente_modulo, $periodo, $show_event,
|
||||||
|
@ -156,10 +156,10 @@ function slicesbar_graph($chart_data, $period, $width, $height, $colors, $font,
|
|||||||
|
|
||||||
function vbar_graph($flash_chart, $chart_data, $width, $height, $color = array(),
|
function vbar_graph($flash_chart, $chart_data, $width, $height, $color = array(),
|
||||||
$legend = array(), $xaxisname = "", $yaxisname = "", $homedir="",
|
$legend = array(), $xaxisname = "", $yaxisname = "", $homedir="",
|
||||||
$water_mark = '', $font = '', $font_size = '', $force_steps = true, $ttl = 1) {
|
$water_mark = '', $font = '', $font_size = '', $force_steps = true, $ttl = 1, $reduce_data_columns = false) {
|
||||||
|
|
||||||
if($flash_chart) {
|
if($flash_chart) {
|
||||||
echo fs_2d_column_chart ($chart_data, $width, $height, $homedir);
|
echo fs_2d_column_chart ($chart_data, $width, $height, $homedir, $reduce_data_columns);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$graph = array();
|
$graph = array();
|
||||||
|
@ -520,7 +520,7 @@ function fs_2d_pie_chart ($data, $names, $width, $height, $background = "EEEEEE"
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Returns a 2D column chart
|
// Returns a 2D column chart
|
||||||
function fs_2d_column_chart ($data, $width, $height, $homeurl = '') {
|
function fs_2d_column_chart ($data, $width, $height, $homeurl = '', $reduce_data_columns = false) {
|
||||||
if (sizeof ($data) == 0) {
|
if (sizeof ($data) == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -555,9 +555,17 @@ function fs_2d_column_chart ($data, $width, $height, $homeurl = '') {
|
|||||||
';showName=' . $show_name);
|
';showName=' . $show_name);
|
||||||
|
|
||||||
$c = 0;
|
$c = 0;
|
||||||
|
$previous = false;
|
||||||
foreach($values as $i2 => $value) {
|
foreach($values as $i2 => $value) {
|
||||||
|
if ($reduce_data_columns) {
|
||||||
|
if ($previous !== false) {
|
||||||
|
if ($previous == $value) continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
$data2[$i2][$i] = $value;
|
$data2[$i2][$i] = $value;
|
||||||
$c++;
|
$c++;
|
||||||
|
|
||||||
|
$previous = $value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$data = $data2;
|
$data = $data2;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user