sizeWindow ( $leftMargin, $topMargin, $imageWidth - $rightMargin, $imageHeight - $bottomMargin ); // Draw border around graph area. //--------------------------------------------------------------------------- // //--------------------------------------------------------------------------- function plotRectangleRange1($scaleFrom,$scaleTo,$xFrom,$xTo, $color) { global $plot; global $imageWidth; global $leftMargin; global $rightMargin; global $imageHeight; global $topMargin; global $bottomMargin; global $image1; $plot->resetData(); $frameWidth = $imageWidth - $leftMargin - $rightMargin; $scaleCounter = $frameWidth/($scaleTo-$scaleFrom); if ($color == 'green_value') $rgb = imagecolorallocatealpha($image1, 0, 255, 0, 100); else if ($color == 'yellow_value') $rgb = imagecolorallocatealpha($image1, 255, 255, 0, 100); else if ($color == 'red_value') $rgb = imagecolorallocatealpha($image1, 255, 0, 0, 100); if ($leftMargin+$xTo*$scaleCounter > $imageWidth-$rightMargin) $val=$imageWidth-$rightMargin; else $val=$leftMargin+$xTo*$scaleCounter; imagefilledrectangle($image1, $leftMargin+$xFrom*$scaleCounter, $topMargin, $val, $imageHeight-$bottomMargin, $rgb); } function plotCircleRange1($scaleXFrom,$scaleXTo,$scaleYFrom,$scaleYTo,$xParam,$yParam) { global $plot; global $imageWidth; global $leftMargin; global $rightMargin; global $imageHeight; global $topMargin; global $bottomMargin; global $image1; $plot->resetData(); $frameWidth = $imageWidth - $leftMargin - $rightMargin; $frameHeight = $imageHeight - $topMargin - $bottomMargin; $scaleXCounter = $frameWidth/($scaleXTo-$scaleXFrom); $scaleYCounter = $frameHeight/($scaleYTo-$scaleYFrom); if ($leftMargin+$xParam*$scaleXCounter > $imageWidth-$rightMargin) $valX=$imageWidth-$rightMargin; else $valX=$leftMargin+$xParam*$scaleXCounter; $valY=($imageHeight-$bottomMargin)-$yParam*$scaleYCounter; $grey = imagecolorallocate( $image1 , 154 , 154 , 154 ); imagefilledellipse($image1, $valX, $valY, 10, 10, $grey); } //--------------------------------------------------------------------------- // Custom vertical text-- just return value with dolor sign in front //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- // //--------------------------------------------------------------------------- ?>