mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-25 06:46:29 +02:00
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,11 +741,19 @@ function graphic_combined_module ($module_list, $weight_list, $period, $width, $
|
|||||||
if ($only_image) {
|
if ($only_image) {
|
||||||
$flash_charts = false;
|
$flash_charts = false;
|
||||||
}
|
}
|
||||||
|
<<<<<<< .mine
|
||||||
|
|
||||||
if ($flash_charts){
|
if ($flash_charts){
|
||||||
include_flash_chart_script();
|
include_flash_chart_script();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
=======
|
||||||
|
|
||||||
|
if ($flash_charts){
|
||||||
|
include_flash_chart_script();
|
||||||
|
}
|
||||||
|
|
||||||
|
>>>>>>> .r5204
|
||||||
switch ($stacked) {
|
switch ($stacked) {
|
||||||
case GRAPH_AREA:
|
case GRAPH_AREA:
|
||||||
$color = null;
|
$color = null;
|
||||||
@ -760,21 +768,21 @@ function graphic_combined_module ($module_list, $weight_list, $period, $width, $
|
|||||||
return stacked_area_graph($flash_charts, $graph_values, $width, $height,
|
return stacked_area_graph($flash_charts, $graph_values, $width, $height,
|
||||||
$color, $module_name_list, $long_index, "images/image_problem.opaque.png",
|
$color, $module_name_list, $long_index, "images/image_problem.opaque.png",
|
||||||
"", "", $config['homedir'] . "/images/logo_vertical_water.png",
|
"", "", $config['homedir'] . "/images/logo_vertical_water.png",
|
||||||
$config['fontpath'], $config['font_size'], "", $ttl);
|
$config['fontpath'], $config['font_size'], "", $ttl, $homeurl);
|
||||||
break;
|
break;
|
||||||
case GRAPH_LINE:
|
case GRAPH_LINE:
|
||||||
$color = null;
|
$color = null;
|
||||||
return line_graph($flash_charts, $graph_values, $width, $height,
|
return line_graph($flash_charts, $graph_values, $width, $height,
|
||||||
$color, $module_name_list, $long_index, "images/image_problem.opaque.png",
|
$color, $module_name_list, $long_index, "images/image_problem.opaque.png",
|
||||||
"", "", $config['homedir'] . "/images/logo_vertical_water.png",
|
"", "", $config['homedir'] . "/images/logo_vertical_water.png",
|
||||||
$config['fontpath'], $config['font_size'], "", $ttl);
|
$config['fontpath'], $config['font_size'], "", $ttl, $homeurl);
|
||||||
break;
|
break;
|
||||||
case GRAPH_STACKED_LINE:
|
case GRAPH_STACKED_LINE:
|
||||||
$color = null;
|
$color = null;
|
||||||
return stacked_line_graph($flash_charts, $graph_values, $width, $height,
|
return stacked_line_graph($flash_charts, $graph_values, $width, $height,
|
||||||
$color, $module_name_list, $long_index, "images/image_problem.opaque.png",
|
$color, $module_name_list, $long_index, "images/image_problem.opaque.png",
|
||||||
"", "", $config['homedir'] . "/images/logo_vertical_water.png",
|
"", "", $config['homedir'] . "/images/logo_vertical_water.png",
|
||||||
$config['fontpath'], $config['font_size'], "", $ttl);
|
$config['fontpath'], $config['font_size'], "", $ttl, $homeurl);
|
||||||
break;
|
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,
|
function stacked_area_graph($flash_chart, $chart_data, $width, $height, $color,
|
||||||
$legend, $long_index, $no_data_image, $xaxisname = "", $yaxisname = "",
|
$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)) {
|
if (empty($chart_data)) {
|
||||||
return '<img src="' . $no_data_image . '" />';
|
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);
|
$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,
|
function stacked_line_graph($flash_chart, $chart_data, $width, $height, $color,
|
||||||
$legend, $long_index, $no_data_image, $xaxisname = "", $yaxisname = "",
|
$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)) {
|
if (empty($chart_data)) {
|
||||||
return '<img src="' . $no_data_image . '" />';
|
return '<img src="' . $no_data_image . '" />';
|
||||||
@ -282,13 +282,13 @@ function stacked_line_graph($flash_chart, $chart_data, $width, $height, $color,
|
|||||||
|
|
||||||
$id_graph = serialize_in_temp($graph, null, $ttl);
|
$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,
|
function line_graph($flash_chart, $chart_data, $width, $height, $color, $legend,
|
||||||
$long_index, $no_data_image, $xaxisname = "", $yaxisname = "",
|
$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)) {
|
if (empty($chart_data)) {
|
||||||
return '<img src="' . $no_data_image . '" />';
|
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);
|
$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…
x
Reference in New Issue
Block a user