/**
* SourceForge: Breaking Down the Barriers to Open Source Development
* Copyright 1999-2001 (c) VA Linux Systems
+ * Copyright (C) 2012 Alain Peyrat - Alcatel-Lucent
* http://sourceforge.net
*
* @author Tim Perdue <tperdue@valnux.com>
$colspan = SizeOf($names) + 1;
}
- print '<tr><td align="center" valign="center" ';
+ print '<tr><td class="align-center" valign="center" ';
// If a background was choosen don't print cell BGCOLOR
if (! $vals["background"]) { print 'style="background-color:' . $vals["hbgcolor"] . '"'; }
print "<strong>" . $vals["hlabel"] . "</strong>";
print '</span></td></tr>';
- print '<tr><td align="center" valign="center" ';
+ print '<tr><td class="align-center" valign="center" ';
// If a background was choosen don't print cell BGCOLOR
if (! $vals["background"]) { print 'style="background-color:' . $vals["vbgcolor"] . '"'; }
*/
function hv_graph_defaults($vals)
{
- if (! $vals["vfcolor"]) { $vals["vfcolor"]="#000000"; }
- if (! $vals["hfcolor"]) { $vals["hfcolor"]="#000000"; }
- if (! $vals["vbgcolor"]) { $vals["vbgcolor"]="#ffffff"; }
- if (! $vals["hbgcolor"]) { $vals["hbgcolor"]="#ffffff"; }
- if (! $vals["cellpadding"]) { $vals["cellpadding"]=0; }
- if (! $vals["cellspacing"]) { $vals["cellspacing"]=0; }
- if (! $vals["border"]) { $vals["border"]=0; }
- if (! $vals["scale"]) { $vals["scale"]=1; }
- if (! $vals["namebgcolor"]) { $vals["namebgcolor"]="#ffffff"; }
- if (! $vals["valuebgcolor"]) { $vals["valuebgcolor"]="#ffffff"; }
- if (! $vals["namefcolor"]) { $vals["namefcolor"]="#000000"; }
- if (! $vals["valuefcolor"]) { $vals["valuefcolor"]="#000000"; }
- if (! $vals["doublefcolor"]) { $vals["doublefcolor"]="#886666"; }
+ if (!isset($vals["vfcolor"])) { $vals["vfcolor"]="#000000"; }
+ if (!isset($vals["hfcolor"])) { $vals["hfcolor"]="#000000"; }
+ if (!isset($vals["vbgcolor"])) { $vals["vbgcolor"]="#ffffff"; }
+ if (!isset($vals["hbgcolor"])) { $vals["hbgcolor"]="#ffffff"; }
+ if (!isset($vals["cellpadding"])) { $vals["cellpadding"]=0; }
+ if (!isset($vals["cellspacing"])) { $vals["cellspacing"]=0; }
+ if (!isset($vals["border"])) { $vals["border"]=0; }
+ if (!isset($vals["scale"])) { $vals["scale"]=1; }
+ if (!isset($vals["namebgcolor"])) { $vals["namebgcolor"]="#ffffff"; }
+ if (!isset($vals["valuebgcolor"])) { $vals["valuebgcolor"]="#ffffff"; }
+ if (!isset($vals["namefcolor"])) { $vals["namefcolor"]="#000000"; }
+ if (!isset($vals["valuefcolor"])) { $vals["valuefcolor"]="#000000"; }
+ if (!isset($vals["doublefcolor"])) { $vals["doublefcolor"]="#886666"; }
return ($vals);
}
?>
<tr>
- <td align="right" <?php
+ <td class="align-right" <?php
// If a background was choosen don't print cell BGCOLOR
if (! $vals["background"]) { print ' style="background-color:' . $vals["namebgcolor"] . '"'; }
?>>
{
?>
- <table align="left" cellpadding="0" cellspacing="0" style="background-color:<?php echo $bars[$i] ?>" width="<?php echo $values[$i] * $vals["scale"] ?>">
+ <table align="left" style="background-color:<?php echo $bars[$i] ?>" width="<?php echo $values[$i] * $vals["scale"] ?>">
<tr><td> </td></tr>
</table>
for( $i=0;$i<SizeOf($values);$i++ )
{
?>
- <td align="center" valign="top"
+ <td class="align-center" valign="top"
<?php
// If a background was choosen don't print cell BGCOLOR
{
?>
<tr>
- <td align="right"
+ <td class="align-right"
<?php
// If a background was choosen don't print cell BGCOLOR
if (! $vals["background"]) { print ' style="background-color:' . $vals["namebgcolor"] . '"'; }
if (! $vals["background"]) { print ' style="background-color:' . $vals["valuebgcolor"] . '"'; }
?>
>
- <table align="left" cellpadding="0" cellspacing="0" width="<?php echo $dvalues[$i] * $vals["scale"] ?>">
+ <table align="left" width="<?php echo $dvalues[$i] * $vals["scale"] ?>">
<tr><td
<?php
// Set background to a color if it starts with # or
if (preg_match("/^#/", $bars[$i]))
{
?>
- <table align="left" cellpadding="0" cellspacing="0"
+ <table align="left"
style="background-color:"<?php echo $bars[$i] ?>"
width="<?php echo $values[$i] * $vals["scale"] ?>">
<tr><td> </td></tr>
for( $i=0;$i<SizeOf($values);$i++ )
{
- print '<td align="center" valign="bottom" ';
+ print '<td class="align-center" valign="bottom" ';
// If a background was choosen don't print cell BGCOLOR
if (! $vals["background"]) { print ' style="background-color:' . $vals["valuebgcolor"] . '"'; }
print ">";
- print '<table><tr><td align="center" valign="bottom" ';
+ print '<table><tr><td class="align-center" valign="bottom" ';
// If a background was choosen don't print cell BGCOLOR
if (! $vals["background"]) { print ' style="background-color:' . $vals["valuebgcolor"] . '"'; }
<img src="<?php echo $bars[$i] ?>" width="10" height="<?php if ($values[$i]!=0){
echo $values[$i] * $vals["scale"];
} else { echo "1";} ?>" alt="" />
- </td><td align="center" valign="bottom"
+ </td><td class="align-center" valign="bottom"
<?php
// If a background was choosen don't print cell BGCOLOR
if (! $vals["background"]) { print ' style="background-color:' . $vals["valuebgcolor"] . '"'; }
for( $i=0;$i<SizeOf($values);$i++ )
{
?>
- <td align="center" valign="top"
+ <td class="align-center" valign="top"
<?php
// If a background was choosen don't print cell BGCOLOR
# Function: horizontal_absolute_multi_graph($names, $multi_rows,
# $colors, $vals,
# $additive)
-# $multi_rows - array of arrays of values (may be seen as
+# $multi_rows - array of arrays of values (may be seen as
# array of columns - column for first color, for second, etc.)
# $colors - array of color names or codes
-# $additive - treat data as absolute values (will be
+# $additive - treat data as absolute values (will be
# differentiated for drawing, and hence should be non-decreasing
# sequence) or additive (just stick one on another).
#
?>
<tr>
- <td align="right" <?php
+ <td class="align-right" <?php
// If a background was choosen don't print cell BGCOLOR
- if (! $vals["background"]) { print ' style="background-color:' . $vals["namebgcolor"] . '"'; }
+ if (! $vals["background"]) {
+ print ' style="background-color:' . $vals["namebgcolor"] . '"';
+ }
?>>
<span style="font-size:-1;color:<?php echo $vals["namefcolor"]; ?>;<?php echo $vals["namefstyle"]; ?>">
<?php
<td align="left" <?php
// If a background was choosen don't print cell BGCOLOR
- if (! $vals["background"]) { print ' style="background-color:' . $vals["valuebgcolor"] . '"'; }
-
- echo ">";
+ if (! $vals["background"]) {
+ print ' style="background-color:' . $vals["valuebgcolor"] . '"';
+ }
+ echo ">";
- echo '<table align="left" border="0" cellpadding="0" cellspacing="0"><tr>'."\n";
+ echo '<table align="left"><tr>'."\n";
$prev_val=0;
$shown=0;
- for( $j=0;$j<$subbars_num;$j++ ) {
+ for( $j=0;$j<$subbars_num;$j++ ) {
$width=$multi_rows[$j][$i];
- if (!$additive) $width-=$prev_val;
- if ($width<=0 && ($j!=$subbars_num-1 || $shown)) continue;
- // make sure that we show at least stump, but only one
- $shown=1;
- $prev_val=$multi_rows[$j][$i];
- $pix_width=$width * $vals["scale"];
- echo "<td style=\"background-color:".$colors[$j]."\" width=\"".$pix_width."\"> </td>";
+ if (!$additive) $width-=$prev_val;
+ if ($width<=0 && ($j!=$subbars_num-1 || $shown)) continue;
+ // make sure that we show at least stump, but only one
+ $shown=1;
+ $prev_val=$multi_rows[$j][$i];
+ $pix_width=$width * $vals["scale"];
+ echo "<td style=\"background-color:".$colors[$j]."\" width=\"".$pix_width."\"> </td>";
}
echo '</tr></table>';
- if (! $vals["noshowvals"])
- {
- print ' <em><span style="font-size:-2;color:' . $vals["valuefcolor"] . ';'
+ if (! $vals["noshowvals"]) {
+ print ' <em><span style="font-size:-2;color:' . $vals["valuefcolor"] . ';'
. $vals["valuefstyle"] . '"> (';
for( $j=0;$j<SizeOf($multi_rows);$j++ ) {
if ($j) print "/";
$scale=($width/$max_value);
return $scale;
}
-
-?>