src/UI/Image/Graph/Components.php
public static function setAxis( $object, $config, $data )
	{
		$object->setColor( self::getConfigValue( $config, 'color', 'black' ) );
		$object->setWeight( self::getConfigValue( $config, 'weight', 1 ) );
		$object->SetTextLabelInterval( self::getConfigValue( $config, 'label.interval', 1 ) );
		$object->SetLabelAngle( self::getConfigValue( $config, 'label.angle', 0 ) );
		self::setTitle( $object->title, self::getSubConfig( $config, 'title.' ) );
		self::setFont( $object, self::getSubConfig( $config, 'label.' ) );

		$labels		= self::getConfigValue( $config, 'label.data' );
		if( $labels )
		{
			if( !isset( $data[$labels] ) )
				throw new Exception( 'Data source "'.$labels.'" is not available.' );
			$object->setTickLabels( $data[$labels] );
		}
		$grace		= self::getConfigValue( $config, 'scale.grace', 0 );
		if( $grace )
			$object->scale->setGrace( $grace );
	}
public static function setAxis( $object, $config, $data )
	{
		$object->setColor( self::getConfigValue( $config, 'color', 'black' ) );
		$object->setWeight( self::getConfigValue( $config, 'weight', 1 ) );
		$object->SetTextLabelInterval( self::getConfigValue( $config, 'label.interval', 1 ) );
		$object->SetLabelAngle( self::getConfigValue( $config, 'label.angle', 0 ) );
		self::setTitle( $object->title, self::getSubConfig( $config, 'title.' ) );
		self::setFont( $object, self::getSubConfig( $config, 'label.' ) );

		$labels		= self::getConfigValue( $config, 'label.data' );
		if( $labels )
		{
			if( !isset( $data[$labels] ) )
				throw new Exception( 'Data source "'.$labels.'" is not available.' );
			$object->setTickLabels( $data[$labels] );
		}
		$grace		= self::getConfigValue( $config, 'scale.grace', 0 );
		if( $grace )
			$object->scale->setGrace( $grace );
	}
public static function setAxis ( $ object , $ config , $ data ) { $ object -> setColor ( self :: getConfigValue ( $ config , 'color' , 'black' ) ) ; $ object -> setWeight ( self :: getConfigValue ( $ config , 'weight' , 1 ) ) ; $ object -> SetTextLabelInterval ( self :: getConfigValue ( $ config , 'label.interval' , 1 ) ) ; $ object -> SetLabelAngle ( self :: getConfigValue ( $ config , 'label.angle' , 0 ) ) ; self :: setTitle ( $ object -> title , self :: getSubConfig ( $ config , 'title.' ) ) ; self :: setFont ( $ object , self :: getSubConfig ( $ config , 'label.' ) ) ; $ labels = self :: getConfigValue ( $ config , 'label.data' ) ; if ( $ labels ) { if ( ! isset ( $ data [ $ labels ] ) ) throw new Exception ( 'Data source "' . $ labels . '" is not available.' ) ; $ object -> setTickLabels ( $ data [ $ labels ] ) ; } $ grace = self :: getConfigValue ( $ config , 'scale.grace' , 0 ) ; if ( $ grace ) $ object -> scale -> setGrace ( $ grace ) ; }
Adds an Axis to the JpGraph Graph Object.
@access		public
@static
@param		Graph		$object			JpGraph Graph Object
@param		array		$config			Configuration Data
@param		array		$data			Graph Data
@return		void
Adds an Axis to the JpGraph Graph Object .