* @param axisValueRenderEvent
***********************************************************************************/
public void postRender( AxisValueRenderEvent axisValueRenderEvent )
{
AxisChart axisChart = (AxisChart) axisValueRenderEvent.getSource();
TextTag valueTag;
float x;
float y;
if( axisValueRenderEvent.getiAxisPlotDataSet() instanceof IAxisChartDataSet )
{
IAxisChartDataSet iAxisChartDataSet = (IAxisChartDataSet) axisValueRenderEvent.getiAxisPlotDataSet();
double value = iAxisChartDataSet.getValue( axisValueRenderEvent.getDataSetIndex(), axisValueRenderEvent.getValueIndex() );
valueTag = new TextTag( this.numberFormat.format( value ),
this.valueChartFont.getFont(),
this.derivedFont,
axisValueRenderEvent.getFontRenderContext() );
if( axisChart.getAxisProperties().isPlotHorizontal() )
{
x = this.calculateXHorizontalPlot( axisValueRenderEvent, valueTag, (value < 0) );
y = this.calculateYHorizontalPlot( axisValueRenderEvent, valueTag );
}
else
{
x = this.calculateXVerticalPlot( axisValueRenderEvent, valueTag );
y = this.calculateYVerticalPlot( axisValueRenderEvent, valueTag, (value < 0) );
}
}
else
{
//todo scatter and hi/low
valueTag = null;
x = 100;
y = 100;
throw new RuntimeException( "Axis Values not yet implemented for this type of chart." );
}
/*
Line2D.Float line= new Line2D.Float( x, y, x, y -20 );
axisValueRenderEvent.getGraphics2D().draw( line );
*/
valueTag.setXPosition( x );
valueTag.setYPosition( y );
valueTag.render( axisValueRenderEvent.getGraphics2D(), this.valueChartFont.getPaint() );
}