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 );
	}