2011-11-29 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_graph.php include/graphs/fgraph.php: Fixed custom graphs exportation to PDF. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5205 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
9775e498b5
commit
e516df8cb5
|
@ -741,40 +741,48 @@ function graphic_combined_module ($module_list, $weight_list, $period, $width, $
|
|||
if ($only_image) {
|
||||
$flash_charts = false;
|
||||
}
|
||||
<<<<<<< .mine
|
||||
|
||||
if ($flash_charts){
|
||||
include_flash_chart_script();
|
||||
}
|
||||
|
||||
=======
|
||||
|
||||
if ($flash_charts){
|
||||
include_flash_chart_script();
|
||||
}
|
||||
|
||||
>>>>>>> .r5204
|
||||
switch ($stacked) {
|
||||
case GRAPH_AREA:
|
||||
$color = null;
|
||||
$color = null;
|
||||
return area_graph($flash_charts, $graph_values, $width, $height,
|
||||
$color, $module_name_list, $long_index, "images/image_problem.opaque.png",
|
||||
"", "", $homeurl, $config['homedir'] . "/images/logo_vertical_water.png",
|
||||
$config['fontpath'], $config['font_size'], "", $ttl);
|
||||
$config['fontpath'], $config['font_size'], "", $ttl);
|
||||
break;
|
||||
default:
|
||||
case GRAPH_STACKED_AREA:
|
||||
case GRAPH_STACKED_AREA:
|
||||
$color = null;
|
||||
return stacked_area_graph($flash_charts, $graph_values, $width, $height,
|
||||
$color, $module_name_list, $long_index, "images/image_problem.opaque.png",
|
||||
"", "", $config['homedir'] . "/images/logo_vertical_water.png",
|
||||
$config['fontpath'], $config['font_size'], "", $ttl);
|
||||
$config['fontpath'], $config['font_size'], "", $ttl, $homeurl);
|
||||
break;
|
||||
case GRAPH_LINE:
|
||||
case GRAPH_LINE:
|
||||
$color = null;
|
||||
return line_graph($flash_charts, $graph_values, $width, $height,
|
||||
$color, $module_name_list, $long_index, "images/image_problem.opaque.png",
|
||||
"", "", $config['homedir'] . "/images/logo_vertical_water.png",
|
||||
$config['fontpath'], $config['font_size'], "", $ttl);
|
||||
$config['fontpath'], $config['font_size'], "", $ttl, $homeurl);
|
||||
break;
|
||||
case GRAPH_STACKED_LINE:
|
||||
$color = null;
|
||||
return stacked_line_graph($flash_charts, $graph_values, $width, $height,
|
||||
$color, $module_name_list, $long_index, "images/image_problem.opaque.png",
|
||||
"", "", $config['homedir'] . "/images/logo_vertical_water.png",
|
||||
$config['fontpath'], $config['font_size'], "", $ttl);
|
||||
$config['fontpath'], $config['font_size'], "", $ttl, $homeurl);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -222,7 +222,7 @@ function area_graph($flash_chart, $chart_data, $width, $height, $color, $legend,
|
|||
|
||||
function stacked_area_graph($flash_chart, $chart_data, $width, $height, $color,
|
||||
$legend, $long_index, $no_data_image, $xaxisname = "", $yaxisname = "",
|
||||
$water_mark = "", $font = '', $font_size = '', $unit = '', $ttl = 1) {
|
||||
$water_mark = "", $font = '', $font_size = '', $unit = '', $ttl = 1, $homeurl = '') {
|
||||
|
||||
if (empty($chart_data)) {
|
||||
return '<img src="' . $no_data_image . '" />';
|
||||
|
@ -249,13 +249,13 @@ function stacked_area_graph($flash_chart, $chart_data, $width, $height, $color,
|
|||
|
||||
$id_graph = serialize_in_temp($graph, null, $ttl);
|
||||
|
||||
return "<img src='include/graphs/functions_pchart.php?graph_type=stacked_area&ttl=".$ttl."&id_graph=" . $id_graph . "' />";
|
||||
return "<img src='" . $homeurl . "/include/graphs/functions_pchart.php?graph_type=stacked_area&ttl=".$ttl."&id_graph=" . $id_graph . "' />";
|
||||
}
|
||||
}
|
||||
|
||||
function stacked_line_graph($flash_chart, $chart_data, $width, $height, $color,
|
||||
$legend, $long_index, $no_data_image, $xaxisname = "", $yaxisname = "",
|
||||
$water_mark = "", $font = '', $font_size = '', $unit = '', $ttl = 1) {
|
||||
$water_mark = "", $font = '', $font_size = '', $unit = '', $ttl = 1, $homeurl = '') {
|
||||
|
||||
if (empty($chart_data)) {
|
||||
return '<img src="' . $no_data_image . '" />';
|
||||
|
@ -282,14 +282,14 @@ function stacked_line_graph($flash_chart, $chart_data, $width, $height, $color,
|
|||
|
||||
$id_graph = serialize_in_temp($graph, null, $ttl);
|
||||
|
||||
return "<img src='include/graphs/functions_pchart.php?graph_type=line&ttl=".$ttl."&id_graph=" . $id_graph . "' />";
|
||||
return "<img src='" . $homeurl . "/include/graphs/functions_pchart.php?graph_type=line&ttl=".$ttl."&id_graph=" . $id_graph . "' />";
|
||||
}
|
||||
}
|
||||
|
||||
function line_graph($flash_chart, $chart_data, $width, $height, $color, $legend,
|
||||
$long_index, $no_data_image, $xaxisname = "", $yaxisname = "",
|
||||
$water_mark = "", $font = '', $font_size = '', $unit = '', $ttl = 1) {
|
||||
|
||||
$water_mark = "", $font = '', $font_size = '', $unit = '', $ttl = 1, $homeurl = '') {
|
||||
|
||||
if (empty($chart_data)) {
|
||||
return '<img src="' . $no_data_image . '" />';
|
||||
}
|
||||
|
@ -312,7 +312,7 @@ function line_graph($flash_chart, $chart_data, $width, $height, $color, $legend,
|
|||
|
||||
$id_graph = serialize_in_temp($graph, null, $ttl);
|
||||
|
||||
return "<img src='include/graphs/functions_pchart.php?graph_type=line&ttl=".$ttl."&id_graph=" . $id_graph . "' />";
|
||||
return "<img src='" . $homeurl . "/include/graphs/functions_pchart.php?graph_type=line&ttl=".$ttl."&id_graph=" . $id_graph . "' />";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue