org.jCharts.axisChart.customRenderers.axisValue.renderers

## Class ValueLabelRenderer

- java.lang.Object
- - org.jCharts.axisChart.customRenderers.axisValue.renderers.ValueLabelRenderer

All Implemented Interfaces:
  EventListener, PostAxisValueRenderListener

    public class ValueLabelRenderer
    extends Object
    implements PostAxisValueRenderListener

### Field Summary

Fields
`private Font` `derivedFont`
`private boolean` `isLabelVertical`
`private NumberFormat` `numberFormat`
`private int` `pixelValuePadding`
`private ChartFont` `valueChartFont`
`private ValueLabelPosition` `valueLabelPosition`

### Constructor Summary

Constructors
Constructor and Description
`ValueLabelRenderer(boolean isCurrency, boolean isPercent, boolean showGrouping, int roundingPowerOfTen)`
`ValueLabelRenderer(boolean isCurrency, boolean showGrouping, int roundingPowerOfTen)` Deprecated.

### Method Summary

Methods
`private float` `calculateXHorizontalPlot(AxisValueRenderEvent axisValueRenderEvent, TextTag formattedTextTag, boolean isNegative)`
`private float` `calculateXVerticalPlot(AxisValueRenderEvent axisValueRenderEvent, TextTag formattedTextTag)` Calculates the label x so that the label is centered on the scale item.
`private float` `calculateYHorizontalPlot(AxisValueRenderEvent axisValueRenderEvent, TextTag formattedTextTag)`
`private float` `calculateYVerticalPlot(AxisValueRenderEvent axisValueRenderEvent, TextTag formattedTextTag, boolean isNegative)`
`void` `postRender(AxisValueRenderEvent axisValueRenderEvent)`
`void` `setPixelValuePadding(int pixelValuePadding)` The pixel padding between the label and the data point.
`void` `setValueChartFont(ChartFont valueChartFont)`
`void` `setValueLabelPosition(ValueLabelPosition valueLabelPosition)` Sets where you would like to position the label
`void` `useVerticalLabels(boolean useVerticalLabels)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### numberFormat

    private NumberFormat numberFormat

#### valueChartFont

    private ChartFont valueChartFont

#### derivedFont

    private Font derivedFont

#### isLabelVertical

    private boolean isLabelVertical

#### valueLabelPosition

    private ValueLabelPosition valueLabelPosition

#### pixelValuePadding

    private int pixelValuePadding

### Constructor Detail

#### ValueLabelRenderer

    public ValueLabelRenderer(boolean isCurrency,
                      boolean showGrouping,
                      int roundingPowerOfTen)

Deprecated.

Parameters:
  `isCurrency` -
  `showGrouping` -
  `roundingPowerOfTen` -

#### ValueLabelRenderer

    public ValueLabelRenderer(boolean isCurrency,
                      boolean isPercent,
                      boolean showGrouping,
                      int roundingPowerOfTen)

Parameters:
  `isCurrency` -
  `isPercent` -
  `showGrouping` -
  `roundingPowerOfTen` -

### Method Detail

#### setValueLabelPosition

    public void setValueLabelPosition(ValueLabelPosition valueLabelPosition)

Sets where you would like to position the label

Parameters:
  `valueLabelPosition` -

#### setValueChartFont

    public void setValueChartFont(ChartFont valueChartFont)

Parameters:
  `valueChartFont` -

#### useVerticalLabels

    public void useVerticalLabels(boolean useVerticalLabels)

Parameters:
  `useVerticalLabels` -

#### setPixelValuePadding

    public void setPixelValuePadding(int pixelValuePadding)

The pixel padding between the label and the data point.

Parameters:
  `pixelValuePadding` -

#### postRender

    public void postRender(AxisValueRenderEvent axisValueRenderEvent)

Specified by:
  `postRender` in interface `PostAxisValueRenderListener`
Parameters:
  `axisValueRenderEvent` -

#### calculateXVerticalPlot

    private float calculateXVerticalPlot(AxisValueRenderEvent axisValueRenderEvent,
                               TextTag formattedTextTag)

Calculates the label x so that the label is centered on the scale item.

Parameters:
  `axisValueRenderEvent` -
  `formattedTextTag` -
Returns:
  float

#### calculateYHorizontalPlot

    private float calculateYHorizontalPlot(AxisValueRenderEvent axisValueRenderEvent,
                                 TextTag formattedTextTag)

Parameters:
  `axisValueRenderEvent` -
  `formattedTextTag` -
Returns:
  float

#### calculateXHorizontalPlot

    private float calculateXHorizontalPlot(AxisValueRenderEvent axisValueRenderEvent,
                                 TextTag formattedTextTag,
                                 boolean isNegative)

Parameters:
  `axisValueRenderEvent` -
  `formattedTextTag` -
  `isNegative` -
Returns:

#### calculateYVerticalPlot

    private float calculateYVerticalPlot(AxisValueRenderEvent axisValueRenderEvent,
                               TextTag formattedTextTag,
                               boolean isNegative)

Parameters:
  `axisValueRenderEvent` -
  `formattedTextTag` -
  `isNegative` -
Returns: