org.jCharts.axisChart.axis

## Class YAxis

- java.lang.Object
- - org.jCharts.axisChart.axis.Axis
  - - org.jCharts.axisChart.axis.YAxis

- All Implemented Interfaces:
    Serializable, HTMLTestable

      public final class YAxis
      extends Axis
      implements HTMLTestable

  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private float` | `lastTickY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `YAxis(AxisChart axisChart, int numberOfScaleItems)` Constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `float` | `computeAxisCoordinate(float origin, double value, double axisMinValue)` Takes a value and determines the screen coordinate it should be drawn at.
    `void` | `computeMinimumWidthNeeded(String yAxisTitle)` Computes the minimum pixel width required for the Y-Axis.
    `float` | `getLastTickY()` Need this value as horizontal plots start from the top of the axis and go down
    `void` | `render(Graphics2D graphics2D, AxisProperties axisProperties, String yAxisTitle)` Renders the YAxis on the passes Graphics2D object
    `private void` | `renderAxisTitle(String axisTitle, Graphics2D graphics2D, AxisTypeProperties axisTypeProperties)`
    `void` | `toHTML(HTMLGenerator htmlGenerator)` Enables the testing routines to display the contents of this Object.

    - ### Methods inherited from class org.jCharts.axisChart.axis.Axis

      `computeAxisTitleDimensions, computeOneUnitPixelSize, computeScalePixelWidth, computeScalePixelWidthDataAxis, getAxisChart, getAxisLabelsGroup, getMinimumHeightNeeded, getMinimumWidthNeeded, getNumberOfScaleItems, getOneUnitPixelSize, getOrigin, getPixelLength, getScaleCalculator, getScalePixelWidth, getTickStart, getTitleHeight, getTitleWidth, getZeroLineCoordinate, setAxisLabelsGroup, setMinimumHeightNeeded, setMinimumWidthNeeded, setOneUnitPixelSize, setOrigin, setPixelLength, setScaleCalculator, setScalePixelWidth, setTickStart, setZeroLineCoordinate`

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

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

- - ### Field Detail

    - #### lastTickY

          private float lastTickY

  - ### Constructor Detail

    - #### YAxis

          public YAxis(AxisChart axisChart,
                       int numberOfScaleItems)

      Constructor
      Parameters:
        `axisChart` -

  - ### Method Detail

    - #### getLastTickY

          public float getLastTickY()

      Need this value as horizontal plots start from the top of the axis and go down
      Returns:

    - #### computeMinimumWidthNeeded

          public void computeMinimumWidthNeeded(String yAxisTitle)

      Computes the minimum pixel width required for the Y-Axis. Includes space, if needed, for: axis title + padding, axis values + tick padding, and tick marks.

    - #### renderAxisTitle

          private void renderAxisTitle(String axisTitle,
                                       Graphics2D graphics2D,
                                       AxisTypeProperties axisTypeProperties)

      Parameters:
        `axisTitle` -
        `graphics2D` -
        `axisTypeProperties` -

    - #### render

          public void render(Graphics2D graphics2D,
                             AxisProperties axisProperties,
                             String yAxisTitle)

      Renders the YAxis on the passes Graphics2D object
      Parameters:
        `graphics2D` -
        `axisProperties` -
        `yAxisTitle` -

    - #### computeAxisCoordinate

          public float computeAxisCoordinate(float origin,
                                             double value,
                                             double axisMinValue)

      Takes a value and determines the screen coordinate it should be drawn at. THe only difference between this and the x-axis is we subtract to the origin versus subtract from it.
      Parameters:
        `origin` -
        `value` -
        `axisMinValue` - the minimum value on the axis
      Returns:
        float the screen pixel coordinate

    - #### toHTML

          public void toHTML(HTMLGenerator htmlGenerator)

      Enables the testing routines to display the contents of this Object.
      Specified by:
        `toHTML` in interface `HTMLTestable`
      Overrides:
        `toHTML` in class `Axis`
      Parameters:
        `htmlGenerator` -