2011-04-12 Sergio Martin <sergio.martin@artica.es>

* include/graphs/functions_fsgraph.php
	include/graphs/fgraph.php
	include/graphs/functions_utils.php: Created a function to 
	include flash charts javascript file into abstraction.
	Clean code



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4192 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
zarzuelo 2011-04-12 16:03:07 +00:00
parent c46c0d86dd
commit f31e80b50d
4 changed files with 15 additions and 3 deletions

View File

@ -1,3 +1,11 @@
2011-04-12 Sergio Martin <sergio.martin@artica.es>
* include/graphs/functions_fsgraph.php
include/graphs/fgraph.php
include/graphs/functions_utils.php: Created a function to
include flash charts javascript file into abstraction.
Clean code
2011-04-12 Sergio Martin <sergio.martin@artica.es>
* include/graphs/functions_fsgraph.php

View File

@ -269,4 +269,9 @@ function pie_graph($graph_type, $flash_chart, $chart_data, $width, $height, $oth
function gantt_graph($project_name, $from, $to, $tasks, $milestones, $width, $height) {
return fs_gantt_chart ($project_name, $from, $to, $tasks, $milestones, $width, $height);
}
function include_flash_chart_script() {
echo '<script language="JavaScript" src="include/graphs/FusionCharts/FusionCharts.js"></script>';
}
?>

View File

@ -157,7 +157,7 @@ function fs_stacked_graph($chart_data, $width, $height, $color, $legend, $long_i
$chart_id = 'chart_' . $random_number;
$output = '<div id="' . $div_id. '" style="z-index:1;"></div>';
$output .= '<script language="JavaScript" src="include/graphs/FusionCharts/FusionCharts.js"></script>';
//$output .= '<script language="JavaScript" src="include/graphs/FusionCharts/FusionCharts.js"></script>';
$output .= '<script type="text/javascript">
<!--
function pie_' . $chart_id . ' () {
@ -461,7 +461,7 @@ function fs_area_graph($chart_data, $width, $height, $color, $legend, $long_inde
$output = '<div id="' . $div_id. '" style="z-index:1;"></div>';
$output .= '<script language="JavaScript" src="include/graphs/FusionCharts/FusionCharts.js"></script>';
//$output .= '<script language="JavaScript" src="include/graphs/FusionCharts/FusionCharts.js"></script>';
$output .= '<script type="text/javascript">
<!--
function pie_' . $chart_id . ' () {

View File

@ -69,7 +69,6 @@ function reverse_data($array) {
return $array2;
}
function stack_data(&$chart_data, &$legend = null, &$color = null) {
foreach ($chart_data as $val_x => $graphs) {
$prev_val = 0;