src/UI/Image/Graph/Components.php
public static function setLegend( $graph, $config )
	{
		if( !self::getConfigValue( $config, 'show' ) )
		{
			$graph->legend->hide();
			return;
		}
		
		$graph->legend->setLayout( self::getConfigValue( $config, 'layout', LEGEND_VERT ) );

		$shadowShow		= self::getConfigValue( $config, 'shadow.show', FALSE );
		$shadowWidth	= self::getConfigValue( $config, 'shadow.width', 2 );
		$shadowColor	= self::getConfigValue( $config, 'shadow.color', 'gray' );
		$graph->legend->setShadow( FALSE );
		if( $shadowShow )
			$graph->legend->setShadow( $shadowColor, $shadowWidth );

		$color		= self::getConfigValue( $config, 'color', 'black' );
		$frameColor	= self::getConfigValue( $config, 'frame.color', 'black' );
		$graph->legend->setColor( $color, $frameColor );
		$graph->legend->setFrameWeight( self::getConfigValue( $config, 'frame.weight', 1 ) ); 

		$posX		= self::getConfigValue( $config, 'pos.x', 0 );
		$posY		= self::getConfigValue( $config, 'pos.y', 0 );
		$posAlignH	= self::getConfigValue( $config, 'pos.align.h', 'right' );
		$posAlignV	= self::getConfigValue( $config, 'pos.align.v', 'top' );
		$graph->legend->pos( $posX, $posY, $posAlignH, $posAlignV );

		$fillColor	= self::getConfigValue( $config, 'fill.color', NULL );
		$graph->legend->setFillColor( $fillColor );

		self::setFont( $graph->legend, $config );
	}
public static function setLegend( $graph, $config )
	{
		if( !self::getConfigValue( $config, 'show' ) )
		{
			$graph->legend->hide();
			return;
		}
		
		$graph->legend->setLayout( self::getConfigValue( $config, 'layout', LEGEND_VERT ) );

		$shadowShow		= self::getConfigValue( $config, 'shadow.show', FALSE );
		$shadowWidth	= self::getConfigValue( $config, 'shadow.width', 2 );
		$shadowColor	= self::getConfigValue( $config, 'shadow.color', 'gray' );
		$graph->legend->setShadow( FALSE );
		if( $shadowShow )
			$graph->legend->setShadow( $shadowColor, $shadowWidth );

		$color		= self::getConfigValue( $config, 'color', 'black' );
		$frameColor	= self::getConfigValue( $config, 'frame.color', 'black' );
		$graph->legend->setColor( $color, $frameColor );
		$graph->legend->setFrameWeight( self::getConfigValue( $config, 'frame.weight', 1 ) ); 

		$posX		= self::getConfigValue( $config, 'pos.x', 0 );
		$posY		= self::getConfigValue( $config, 'pos.y', 0 );
		$posAlignH	= self::getConfigValue( $config, 'pos.align.h', 'right' );
		$posAlignV	= self::getConfigValue( $config, 'pos.align.v', 'top' );
		$graph->legend->pos( $posX, $posY, $posAlignH, $posAlignV );

		$fillColor	= self::getConfigValue( $config, 'fill.color', NULL );
		$graph->legend->setFillColor( $fillColor );

		self::setFont( $graph->legend, $config );
	}
public static function setLegend ( $ graph , $ config ) { if ( ! self :: getConfigValue ( $ config , 'show' ) ) { $ graph -> legend -> hide ( ) ; return ; } $ graph -> legend -> setLayout ( self :: getConfigValue ( $ config , 'layout' , LEGEND_VERT ) ) ; $ shadowShow = self :: getConfigValue ( $ config , 'shadow.show' , FALSE ) ; $ shadowWidth = self :: getConfigValue ( $ config , 'shadow.width' , 2 ) ; $ shadowColor = self :: getConfigValue ( $ config , 'shadow.color' , 'gray' ) ; $ graph -> legend -> setShadow ( FALSE ) ; if ( $ shadowShow ) $ graph -> legend -> setShadow ( $ shadowColor , $ shadowWidth ) ; $ color = self :: getConfigValue ( $ config , 'color' , 'black' ) ; $ frameColor = self :: getConfigValue ( $ config , 'frame.color' , 'black' ) ; $ graph -> legend -> setColor ( $ color , $ frameColor ) ; $ graph -> legend -> setFrameWeight ( self :: getConfigValue ( $ config , 'frame.weight' , 1 ) ) ; $ posX = self :: getConfigValue ( $ config , 'pos.x' , 0 ) ; $ posY = self :: getConfigValue ( $ config , 'pos.y' , 0 ) ; $ posAlignH = self :: getConfigValue ( $ config , 'pos.align.h' , 'right' ) ; $ posAlignV = self :: getConfigValue ( $ config , 'pos.align.v' , 'top' ) ; $ graph -> legend -> pos ( $ posX , $ posY , $ posAlignH , $ posAlignV ) ; $ fillColor = self :: getConfigValue ( $ config , 'fill.color' , NULL ) ; $ graph -> legend -> setFillColor ( $ fillColor ) ; self :: setFont ( $ graph -> legend , $ config ) ; }
Sets the Grid of a JpGraph Graph Object.
@access		public
@static
@param		Graph		$object			JpGraph Graph Object
@param		array		$config			Configuration Data
@return		void
Sets the Grid of a JpGraph Graph Object .