tre.setBlockAlignment( la.getCaption( ) .getFont( ) .getAlignment( ) );
if ( ax.getModelAxis( ).getAssociatedAxes( ).size( ) != 0 ) { tre.setBlockAlignment( la.getCaption( ) .getFont( ) .getAlignment( ) ); } else {  tre.setBlockAlignment( ChartUtil.transposeAlignment( la.getCaption( ) .getFont( ) .getAlignment( ) ) ); }
	public final void renderEachAxis( ) throws ChartException	{		final double dStaggeredLabelOffset = sc.computeStaggeredAxisLabelOffset( xs,				la,				iOrientation );		if ( !lia.isSetVisible( ) )		{			throw new ChartException( ChartEnginePlugin.ID,					ChartException.RENDERING,					"exception.unset.axis.visibility", //$NON-NLS-1$					Messages.getResourceBundle( getRunTimeContext( ).getULocale( ) ) );		}		tre.setLabel( la );		tre.setTextPosition( iLabelLocation );		tre.setLocation( lo );		lre.setLineAttributes( lia );		lre.setStart( LocationImpl.create( 0, 0 ) );		lre.setEnd( LocationImpl.create( 0, 0 ) );		double dXStart = 0;		double dXEnd = 0;		double dZStart = 0;		double dZEnd = 0;		if ( iDimension == IConstants.THREE_D )		{			AllAxes aax = pwa.getAxes( );			dXEnd = aax.getPrimaryBase( ).getScale( ).getEnd( );			dZEnd = aax.getAncillaryBase( ).getScale( ).getEnd( );			dXStart = aax.getPrimaryBase( ).getScale( ).getStart( );			dZStart = aax.getAncillaryBase( ).getScale( ).getStart( );			daEndPoints3D = sc.getEndPoints( );			da3D = sc.getTickCordinates( );			lo3d = Location3DImpl.create( 0, 0, 0 );			t3dre = (Text3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ),					Text3DRenderEvent.class );			t3dre.setLabel( la );			t3dre.setAction( Text3DRenderEvent.RENDER_TEXT_AT_LOCATION );			t3dre.setTextPosition( iLabelLocation );			t3dre.setLocation3D( lo3d );			l3dre = (Line3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ),					Line3DRenderEvent.class );			l3dre.setLineAttributes( lia );			l3dre.setStart3D( Location3DImpl.create( 0, 0, 0 ) );			l3dre.setEnd3D( Location3DImpl.create( 0, 0, 0 ) );		}		if ( iOrientation == IConstants.VERTICAL )		{			final ComputationContext context = new ComputationContext( true );			context.y3d = 0;			context.dX = dLocation;			double dZ = 0;			if ( bRendering3D )			{				Location3D l3d = ax.getAxisCoordinate3D( );				context.dX = l3d.getX( );				dZ = l3d.getZ( );			}			if ( iv != null					&& iv.getType( ) == IntersectionValue.MAX					&& iDimension == IConstants.TWO_5_D )			{				trae.setTransform( TransformationEvent.TRANSLATE );				trae.setTranslation( dSeriesThickness, -dSeriesThickness );				ipr.applyTransformation( trae );			}			context.dTick1 = ( ( iMajorTickStyle & IConstants.TICK_LEFT ) == IConstants.TICK_LEFT )					? ( context.dX - IConstants.TICK_SIZE ) : context.dX;			context.dTick2 = ( ( iMajorTickStyle & IConstants.TICK_RIGHT ) == IConstants.TICK_RIGHT )					? context.dX + IConstants.TICK_SIZE : context.dX;			if ( ( iWhatToDraw & IConstants.AXIS ) == IConstants.AXIS					&& lia.isVisible( ) )			{				if ( bRenderOrthogonal3DAxis )				{					final double dStart = daEndPoints3D[0];					final double dEnd = daEndPoints3D[1];					l3dre.setLineAttributes( lia );					// center					l3dre.setStart3D( context.dX, dStart, dZ );					l3dre.setEnd3D( context.dX, dEnd, dZ );					dc.addLine( l3dre );					// left					l3dre.setStart3D( context.dX, dStart, dZEnd );					l3dre.setEnd3D( context.dX, dEnd, dZEnd );					dc.addLine( l3dre );					// right					l3dre.setStart3D( dXEnd, dStart, dZ );					l3dre.setEnd3D( dXEnd, dEnd, dZ );					dc.addLine( l3dre );					if ( renderer.isInteractivityEnabled( ) )					{						Trigger tg;						EList elTriggers = axModel.getTriggers( );						if ( !elTriggers.isEmpty( ) )						{							ArrayList cachedTriggers = null;							Location3D[] loaHotspot = new Location3D[4];							Polygon3DRenderEvent pre3d = (Polygon3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ),									Polygon3DRenderEvent.class );							// process center y-axis.							loaHotspot[0] = Location3DImpl.create( context.dX									- IConstants.LINE_EXPAND_DOUBLE_SIZE,									dStart,									dZ + IConstants.LINE_EXPAND_DOUBLE_SIZE );							loaHotspot[1] = Location3DImpl.create( context.dX									+ IConstants.LINE_EXPAND_DOUBLE_SIZE,									dStart,									dZ - IConstants.LINE_EXPAND_DOUBLE_SIZE );							loaHotspot[2] = Location3DImpl.create( context.dX									+ IConstants.LINE_EXPAND_DOUBLE_SIZE,									dEnd,									dZ - IConstants.LINE_EXPAND_DOUBLE_SIZE );							loaHotspot[3] = Location3DImpl.create( context.dX									- IConstants.LINE_EXPAND_DOUBLE_SIZE,									dEnd,									dZ + IConstants.LINE_EXPAND_DOUBLE_SIZE );							pre3d.setPoints3D( loaHotspot );							pre3d.setDoubleSided( true );							if ( renderer.get3DEngine( ).processEvent( pre3d,									panningOffset.getX( ),									panningOffset.getY( ) ) != null )							{								final InteractionEvent iev = (InteractionEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ),										InteractionEvent.class );								cachedTriggers = new ArrayList( );								for ( int t = 0; t < elTriggers.size( ); t++ )								{									tg = TriggerImpl.copyInstance( (Trigger) elTriggers.get( t ) );									processTrigger( tg,											StructureSource.createAxis( axModel ) );									cachedTriggers.add( tg );									iev.addTrigger( TriggerImpl.copyInstance( tg ) );								}								iev.setHotSpot( pre3d );								ipr.enableInteraction( iev );							}							// process left y-axis.							pre3d = (Polygon3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ),									Polygon3DRenderEvent.class );							loaHotspot = new Location3D[4];							loaHotspot[0] = Location3DImpl.create( dXStart									- IConstants.LINE_EXPAND_DOUBLE_SIZE,									dStart,									dZEnd + IConstants.LINE_EXPAND_DOUBLE_SIZE );							loaHotspot[1] = Location3DImpl.create( dXStart									+ IConstants.LINE_EXPAND_DOUBLE_SIZE,									dStart,									dZEnd - IConstants.LINE_EXPAND_DOUBLE_SIZE );							loaHotspot[2] = Location3DImpl.create( dXStart									+ IConstants.LINE_EXPAND_DOUBLE_SIZE,									dEnd,									dZEnd - IConstants.LINE_EXPAND_DOUBLE_SIZE );							loaHotspot[3] = Location3DImpl.create( dXStart									- IConstants.LINE_EXPAND_DOUBLE_SIZE,									dEnd,									dZEnd + IConstants.LINE_EXPAND_DOUBLE_SIZE );							pre3d.setPoints3D( loaHotspot );							pre3d.setDoubleSided( true );							if ( renderer.get3DEngine( ).processEvent( pre3d,									panningOffset.getX( ),									panningOffset.getY( ) ) != null )							{								final InteractionEvent iev = (InteractionEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ),										InteractionEvent.class );								if ( cachedTriggers == null )								{									cachedTriggers = new ArrayList( );									for ( int t = 0; t < elTriggers.size( ); t++ )									{										tg = TriggerImpl.copyInstance( (Trigger) elTriggers.get( t ) );										processTrigger( tg,												StructureSource.createAxis( axModel ) );										cachedTriggers.add( tg );										iev.addTrigger( TriggerImpl.copyInstance( tg ) );									}								}								else								{									for ( int t = 0; t < cachedTriggers.size( ); t++ )									{										iev.addTrigger( TriggerImpl.copyInstance( (Trigger) cachedTriggers.get( t ) ) );									}								}								iev.setHotSpot( pre3d );								ipr.enableInteraction( iev );							}							// process right y-axis.							pre3d = (Polygon3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ),									Polygon3DRenderEvent.class );							loaHotspot = new Location3D[4];							loaHotspot[0] = Location3DImpl.create( dXEnd									- IConstants.LINE_EXPAND_DOUBLE_SIZE,									dStart,									dZStart											+ IConstants.LINE_EXPAND_DOUBLE_SIZE );							loaHotspot[1] = Location3DImpl.create( dXEnd									+ IConstants.LINE_EXPAND_DOUBLE_SIZE,									dStart,									dZStart											- IConstants.LINE_EXPAND_DOUBLE_SIZE );							loaHotspot[2] = Location3DImpl.create( dXEnd									+ IConstants.LINE_EXPAND_DOUBLE_SIZE,									dEnd,									dZStart											- IConstants.LINE_EXPAND_DOUBLE_SIZE );							loaHotspot[3] = Location3DImpl.create( dXEnd									- IConstants.LINE_EXPAND_DOUBLE_SIZE,									dEnd,									dZStart											+ IConstants.LINE_EXPAND_DOUBLE_SIZE );							pre3d.setPoints3D( loaHotspot );							pre3d.setDoubleSided( true );							if ( renderer.get3DEngine( ).processEvent( pre3d,									panningOffset.getX( ),									panningOffset.getY( ) ) != null )							{								final InteractionEvent iev = (InteractionEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ),										InteractionEvent.class );								if ( cachedTriggers == null )								{									for ( int t = 0; t < elTriggers.size( ); t++ )									{										tg = TriggerImpl.copyInstance( (Trigger) elTriggers.get( t ) );										processTrigger( tg,												StructureSource.createAxis( axModel ) );										iev.addTrigger( tg );									}								}								else								{									for ( int t = 0; t < cachedTriggers.size( ); t++ )									{										iev.addTrigger( (Trigger) cachedTriggers.get( t ) );									}								}								iev.setHotSpot( pre3d );								ipr.enableInteraction( iev );							}						}					}				}				else				{					double dStart = daEndPoints[0] + insCA.getBottom( ), dEnd = daEndPoints[1]							- insCA.getTop( );					if ( sc.getDirection( ) == IConstants.FORWARD )					{						dStart = daEndPoints[1] + insCA.getBottom( );						dEnd = daEndPoints[0] - insCA.getTop( );					}					if ( iv != null							&& iv.getType( ) == IntersectionValue.VALUE							&& iDimension == IConstants.TWO_5_D )					{						final Location[] loa = new Location[4];						loa[0] = LocationImpl.create( context.dX, dStart );						loa[1] = LocationImpl.create( context.dX								+ dSeriesThickness, dStart - dSeriesThickness );						loa[2] = LocationImpl.create( context.dX								+ dSeriesThickness, dEnd - dSeriesThickness );						loa[3] = LocationImpl.create( context.dX, dEnd );						final PolygonRenderEvent pre = (PolygonRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ),								PolygonRenderEvent.class );						pre.setPoints( loa );						pre.setBackground( ColorDefinitionImpl.create( 255,								255,								255,								127 ) );						pre.setOutline( lia );						ipr.fillPolygon( pre );					}					lre.setLineAttributes( lia );					lre.getStart( ).set( context.dX, dStart );					lre.getEnd( ).set( context.dX, dEnd );					ipr.drawLine( lre );					if ( renderer.isInteractivityEnabled( ) )					{						Trigger tg;						EList elTriggers = axModel.getTriggers( );						if ( !elTriggers.isEmpty( ) )						{							final InteractionEvent iev = (InteractionEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ),									InteractionEvent.class );							for ( int t = 0; t < elTriggers.size( ); t++ )							{								tg = TriggerImpl.copyInstance( (Trigger) elTriggers.get( t ) );								processTrigger( tg,										StructureSource.createAxis( axModel ) );								iev.addTrigger( tg );							}							Location[] loaHotspot = new Location[4];							loaHotspot[0] = LocationImpl.create( context.dX									- IConstants.LINE_EXPAND_SIZE, dStart );							loaHotspot[1] = LocationImpl.create( context.dX									+ IConstants.LINE_EXPAND_SIZE, dStart );							loaHotspot[2] = LocationImpl.create( context.dX									+ IConstants.LINE_EXPAND_SIZE, dEnd );							loaHotspot[3] = LocationImpl.create( context.dX									- IConstants.LINE_EXPAND_SIZE, dEnd );							final PolygonRenderEvent pre = (PolygonRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ),									PolygonRenderEvent.class );							pre.setPoints( loaHotspot );							iev.setHotSpot( pre );							ipr.enableInteraction( iev );						}					}				}			}			// Render by axis type			renderVerticalAxisByType( context,					dXEnd,					dZEnd,					dZ,					dStaggeredLabelOffset );			la = LabelImpl.copyInstance( ax.getTitle( ) ); // TEMPORARILY USE			// FOR AXIS TITLE			if ( la.isVisible( ) && bRenderAxisTitle )			{				ScriptHandler.callFunction( sh,						ScriptHandler.BEFORE_DRAW_AXIS_TITLE,						axModel,						la,						getRunTimeContext( ).getScriptContext( ) );				getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.BEFORE_DRAW_AXIS_TITLE,						la );				final String sRestoreValue = la.getCaption( ).getValue( );				la.getCaption( )						.setValue( getRunTimeContext( ).externalizedMessage( sRestoreValue ) );				BoundingBox bb = null;				try				{					bb = Methods.computeBox( xs,							ax.getTitlePosition( ),							la,							0,							0 );				}				catch ( IllegalArgumentException uiex )				{					throw new ChartException( ChartEnginePlugin.ID,							ChartException.RENDERING,							uiex );				}				if ( ax.getTitle( ).isVisible( ) && la.isVisible( ) )				{					if ( bRendering3D )					{						Bounds cbo = renderer.getPlotBounds( );						tre.setBlockBounds( BoundsImpl.create( cbo.getLeft( )								+ ( cbo.getWidth( ) / 3d - bb.getWidth( ) )								/ 2d,								cbo.getTop( ) + 30,								bb.getWidth( ),								bb.getHeight( ) ) );						tre.setLabel( la );						tre.setBlockAlignment( la.getCaption( )								.getFont( )								.getAlignment( ) );						tre.setAction( TextRenderEvent.RENDER_TEXT_IN_BLOCK );						ipr.drawText( tre );						tre.setBlockBounds( BoundsImpl.create( cbo.getLeft( )								+ cbo.getWidth( ) - bb.getWidth( ),								cbo.getTop( ) + 30 * 2,								bb.getWidth( ),								bb.getHeight( ) ) );						ipr.drawText( tre );					}					else					{						final Bounds bo = BoundsImpl.create( ax.getTitleCoordinate( ),								daEndPoints[1],								bb.getWidth( ),								daEndPoints[0] - daEndPoints[1] );						tre.setBlockBounds( bo );						tre.setLabel( la );						tre.setBlockAlignment( la.getCaption( )								.getFont( )								.getAlignment( ) );						tre.setAction( TextRenderEvent.RENDER_TEXT_IN_BLOCK );						if ( ax.getTitle( ).isVisible( ) )						{							ipr.drawText( tre );						}					}				}				la.getCaption( ).setValue( sRestoreValue );				ScriptHandler.callFunction( sh,						ScriptHandler.AFTER_DRAW_AXIS_TITLE,						axModel,						la,						getRunTimeContext( ).getScriptContext( ) );				getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.AFTER_DRAW_AXIS_TITLE,						la );			}			la = LabelImpl.copyInstance( ax.getLabel( ) );			if ( iv != null					&& iv.getType( ) == IntersectionValue.MAX					&& iDimension == IConstants.TWO_5_D )			{				trae.setTranslation( -dSeriesThickness, dSeriesThickness );				ipr.applyTransformation( trae );			}		}		else if ( iOrientation == IConstants.HORIZONTAL )		{			final ComputationContext context = new ComputationContext( false );			context.x3d = 0;			context.z3d = 0;			context.dY = dLocation;			double dX = 0;			double dZ = 0;			if ( bRendering3D )			{				Location3D l3d = ax.getAxisCoordinate3D( );				dX = l3d.getX( );				context.dY = l3d.getY( );				dZ = l3d.getZ( );			}			context.dTick1 = ( ( iMajorTickStyle & IConstants.TICK_ABOVE ) == IConstants.TICK_ABOVE )					? ( bRendering3D ? context.dY + IConstants.TICK_SIZE							: context.dY - IConstants.TICK_SIZE ) : context.dY;			context.dTick2 = ( ( iMajorTickStyle & IConstants.TICK_BELOW ) == IConstants.TICK_BELOW )					? ( bRendering3D ? context.dY - IConstants.TICK_SIZE							: context.dY + IConstants.TICK_SIZE ) : context.dY;			if ( iv != null					&& iDimension == IConstants.TWO_5_D					&& ( ( bTransposed && renderer.isRightToLeft( ) && iv.getType( ) == IntersectionValue.MIN ) || ( !renderer.isRightToLeft( ) && iv.getType( ) == IntersectionValue.MAX ) ) )			{				trae.setTransform( TransformationEvent.TRANSLATE );				trae.setTranslation( dSeriesThickness, -dSeriesThickness );				ipr.applyTransformation( trae );			}			if ( ( iWhatToDraw & IConstants.AXIS ) == IConstants.AXIS					&& lia.isVisible( ) )			{				if ( bRenderBase3DAxis )				{					final double dStart = daEndPoints3D[0];					final double dEnd = daEndPoints3D[1];					l3dre.setLineAttributes( lia );					l3dre.setStart3D( dStart, context.dY, dZ );					l3dre.setEnd3D( dEnd, context.dY, dZ );					dc.addLine( l3dre );					if ( renderer.isInteractivityEnabled( ) )					{						Trigger tg;						EList elTriggers = axModel.getTriggers( );						if ( !elTriggers.isEmpty( ) )						{							final Polygon3DRenderEvent pre3d = (Polygon3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ),									Polygon3DRenderEvent.class );							Location3D[] loaHotspot = new Location3D[4];							loaHotspot[0] = Location3DImpl.create( dStart,									context.dY											- IConstants.LINE_EXPAND_DOUBLE_SIZE,									dZ );							loaHotspot[1] = Location3DImpl.create( dStart,									context.dY											+ IConstants.LINE_EXPAND_DOUBLE_SIZE,									dZ );							loaHotspot[2] = Location3DImpl.create( dEnd,									context.dY											+ IConstants.LINE_EXPAND_DOUBLE_SIZE,									dZ );							loaHotspot[3] = Location3DImpl.create( dEnd,									context.dY											- IConstants.LINE_EXPAND_DOUBLE_SIZE,									dZ );							pre3d.setPoints3D( loaHotspot );							pre3d.setDoubleSided( true );							if ( renderer.get3DEngine( ).processEvent( pre3d,									panningOffset.getX( ),									panningOffset.getY( ) ) != null )							{								final InteractionEvent iev = (InteractionEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ),										InteractionEvent.class );								for ( int t = 0; t < elTriggers.size( ); t++ )								{									tg = TriggerImpl.copyInstance( (Trigger) elTriggers.get( t ) );									processTrigger( tg,											StructureSource.createAxis( axModel ) );									iev.addTrigger( tg );								}								iev.setHotSpot( pre3d );								ipr.enableInteraction( iev );							}						}					}				}				else if ( bRenderAncillary3DAxis )				{					final double dStart = daEndPoints3D[0];					final double dEnd = daEndPoints3D[1];					l3dre.setLineAttributes( lia );					l3dre.setStart3D( dX, context.dY, dStart );					l3dre.setEnd3D( dX, context.dY, dEnd );					dc.addLine( l3dre );					if ( renderer.isInteractivityEnabled( ) )					{						Trigger tg;						EList elTriggers = axModel.getTriggers( );						if ( !elTriggers.isEmpty( ) )						{							final Polygon3DRenderEvent pre3d = (Polygon3DRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ),									Polygon3DRenderEvent.class );							Location3D[] loaHotspot = new Location3D[4];							loaHotspot[0] = Location3DImpl.create( dX,									context.dY											- IConstants.LINE_EXPAND_DOUBLE_SIZE,									dStart );							loaHotspot[1] = Location3DImpl.create( dX,									context.dY											+ IConstants.LINE_EXPAND_DOUBLE_SIZE,									dStart );							loaHotspot[2] = Location3DImpl.create( dX,									context.dY											+ IConstants.LINE_EXPAND_DOUBLE_SIZE,									dEnd );							loaHotspot[3] = Location3DImpl.create( dX,									context.dY											- IConstants.LINE_EXPAND_DOUBLE_SIZE,									dEnd );							pre3d.setPoints3D( loaHotspot );							pre3d.setDoubleSided( true );							if ( renderer.get3DEngine( ).processEvent( pre3d,									panningOffset.getX( ),									panningOffset.getY( ) ) != null )							{								final InteractionEvent iev = (InteractionEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ),										InteractionEvent.class );								for ( int t = 0; t < elTriggers.size( ); t++ )								{									tg = TriggerImpl.copyInstance( (Trigger) elTriggers.get( t ) );									processTrigger( tg,											StructureSource.createAxis( axModel ) );									iev.addTrigger( tg );								}								iev.setHotSpot( pre3d );								ipr.enableInteraction( iev );							}						}					}				}				else				{					double dStart = daEndPoints[0] - insCA.getLeft( ), dEnd = daEndPoints[1]							+ insCA.getRight( );					if ( sc.getDirection( ) == IConstants.BACKWARD )					{						dStart = daEndPoints[1] - insCA.getLeft( );						dEnd = daEndPoints[0] + insCA.getRight( );					}					if ( iv != null							&& iv.getType( ) == IntersectionValue.VALUE							&& iDimension == IConstants.TWO_5_D )					{						// Zero plane.						final Location[] loa = new Location[4];						loa[0] = LocationImpl.create( dStart, context.dY );						loa[1] = LocationImpl.create( dStart + dSeriesThickness,								context.dY - dSeriesThickness );						loa[2] = LocationImpl.create( dEnd + dSeriesThickness,								context.dY - dSeriesThickness );						loa[3] = LocationImpl.create( dEnd, context.dY );						final PolygonRenderEvent pre = (PolygonRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ),								PolygonRenderEvent.class );						pre.setPoints( loa );						pre.setBackground( ColorDefinitionImpl.create( 255,								255,								255,								127 ) );						pre.setOutline( lia );						ipr.fillPolygon( pre );					}					lre.setLineAttributes( lia );					lre.getStart( ).set( dStart, context.dY );					lre.getEnd( ).set( dEnd, context.dY );					ipr.drawLine( lre );					if ( renderer.isInteractivityEnabled( ) )					{						Trigger tg;						EList elTriggers = axModel.getTriggers( );						if ( !elTriggers.isEmpty( ) )						{							final InteractionEvent iev = (InteractionEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ),									InteractionEvent.class );							for ( int t = 0; t < elTriggers.size( ); t++ )							{								tg = TriggerImpl.copyInstance( (Trigger) elTriggers.get( t ) );								processTrigger( tg,										StructureSource.createAxis( axModel ) );								iev.addTrigger( tg );							}							Location[] loaHotspot = new Location[4];							loaHotspot[0] = LocationImpl.create( dStart,									context.dY - IConstants.LINE_EXPAND_SIZE );							loaHotspot[1] = LocationImpl.create( dEnd,									context.dY - IConstants.LINE_EXPAND_SIZE );							loaHotspot[2] = LocationImpl.create( dEnd,									context.dY + IConstants.LINE_EXPAND_SIZE );							loaHotspot[3] = LocationImpl.create( dStart,									context.dY + IConstants.LINE_EXPAND_SIZE );							final PolygonRenderEvent pre = (PolygonRenderEvent) ( (EventObjectCache) ipr ).getEventObject( StructureSource.createAxis( axModel ),									PolygonRenderEvent.class );							pre.setPoints( loaHotspot );							iev.setHotSpot( pre );							ipr.enableInteraction( iev );						}					}				}			}			renderHorizontalAxisByType( context,					dXEnd,					dZEnd,					dZ,					dStaggeredLabelOffset );			// RENDER THE AXIS TITLE			la = LabelImpl.copyInstance( ax.getTitle( ) ); // TEMPORARILY USE			// FOR AXIS TITLE			if ( la.isVisible( ) && bRenderAxisTitle )			{				ScriptHandler.callFunction( sh,						ScriptHandler.BEFORE_DRAW_AXIS_TITLE,						axModel,						la,						getRunTimeContext( ).getScriptContext( ) );				getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.BEFORE_DRAW_AXIS_TITLE,						la );				final String sRestoreValue = la.getCaption( ).getValue( );				la.getCaption( )						.setValue( getRunTimeContext( ).externalizedMessage( sRestoreValue ) ); // EXTERNALIZE				la.getCaption( )						.getFont( )						.setAlignment( renderer.switchTextAlignment( la.getCaption( )								.getFont( )								.getAlignment( ) ) );				BoundingBox bb = null;				try				{					bb = Methods.computeBox( xs,							ax.getTitlePosition( ),							la,							0,							0 );				}				catch ( IllegalArgumentException uiex )				{					throw new ChartException( ChartEnginePlugin.ID,							ChartException.RENDERING,							uiex );				}				if ( ax.getTitle( ).isVisible( ) && la.isVisible( ) )				{					if ( bRendering3D )					{						Bounds cbo = renderer.getPlotBounds( );						if ( axisType == IConstants.BASE_AXIS )						{							tre.setBlockBounds( BoundsImpl.create( cbo.getLeft( )									+ ( cbo.getWidth( ) / 3d - bb.getWidth( ) ),									cbo.getTop( )											+ cbo.getHeight( )											- Math.min( bb.getHeight( ),													bb.getWidth( ) ) - 30,									bb.getWidth( ),									bb.getHeight( ) ) );						}						else						{							tre.setBlockBounds( BoundsImpl.create( cbo.getLeft( )									+ cbo.getWidth( )									* 2									/ 3d									+ ( cbo.getWidth( ) / 3d - bb.getWidth( ) )									/ 2d,									cbo.getTop( )											+ cbo.getHeight( )											- Math.min( bb.getHeight( ),													bb.getWidth( ) ) - 30 * 2,									bb.getWidth( ),									bb.getHeight( ) ) );						}						tre.setLabel( la );						tre.setBlockAlignment( la.getCaption( )								.getFont( )								.getAlignment( ) );						tre.setAction( TextRenderEvent.RENDER_TEXT_IN_BLOCK );						ipr.drawText( tre );					}					else					{						final Bounds bo = BoundsImpl.create( daEndPoints[0],								ax.getTitleCoordinate( ),								daEndPoints[1] - daEndPoints[0],								bb.getHeight( ) );						tre.setBlockBounds( bo );						tre.setLabel( la );						tre.setBlockAlignment( la.getCaption( )								.getFont( )								.getAlignment( ) );						tre.setAction( TextRenderEvent.RENDER_TEXT_IN_BLOCK );						ipr.drawText( tre );					}				}				ScriptHandler.callFunction( sh,						ScriptHandler.AFTER_DRAW_AXIS_TITLE,						axModel,						la,						getRunTimeContext( ).getScriptContext( ) );				getRunTimeContext( ).notifyStructureChange( IStructureDefinitionListener.AFTER_DRAW_AXIS_TITLE,						la );			}			la = LabelImpl.copyInstance( ax.getLabel( ) ); // RESTORE BACK TO			// AXIS LABEL			if ( iv != null					&& iDimension == IConstants.TWO_5_D					&& ( ( bTransposed && renderer.isRightToLeft( ) && iv.getType( ) == IntersectionValue.MIN ) || ( !renderer.isRightToLeft( ) && iv.getType( ) == IntersectionValue.MAX ) ) )			{				trae.setTranslation( -dSeriesThickness, dSeriesThickness );				ipr.applyTransformation( trae );			}		}	}