All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ColorAxis, XAxis, YAxis

public abstract class Axis extends AbstractConfigurationObject

Abstract Axis class.

Version:
$Id: $Id
Author:
Vaadin
See Also:
  • Field Details

  • Constructor Details

    • Axis

      public Axis()
  • Method Details

    • setAxisIndex

      public void setAxisIndex(int i)

      Setter for the field axisIndex.

      Parameters:
      i - a int.
    • getMin

      public Number getMin()

      Getter for the field min.

      Returns:
      the minimum value of the axis or null
      See Also:
    • setMin

      public void setMin(Number min)
      The minimum value of the axis. If null the min value is automatically calculated. If the startOnTick option is true, the min value might be rounded down.
      Parameters:
      min - a Number object.
    • getMax

      public Number getMax()

      Getter for the field max.

      Returns:
      Maximum value of axis or null
      See Also:
    • setMax

      public void setMax(Number max)
      The maximum value of the axis. If null, the max value is automatically calculated. If the endOnTick option is true, the max value might be rounded up. The actual maximum value is also influenced by chart.alignTicks.
      Parameters:
      max - a Number object.
    • setExtremes

      public void setExtremes(Number min, Number max)
      Sets the minimum and maximum of the axes after rendering has finished. If the startOnTick and endOnTick options are true, the minimum and maximum values are rounded off to the nearest tick. To prevent this, these options can be set to false before calling setExtremes.
      Parameters:
      min - The new minimum value
      max - The new maximum value
    • setExtremes

      public void setExtremes(Number min, Number max, boolean redraw)
      Sets the extremes at runtime.
      Parameters:
      min - Minimum.
      max - Maximum.
      redraw - Whether or not to redraw the chart.
    • setExtremes

      public void setExtremes(Number minimum, Number maximum, boolean redraw, boolean animate)
      Run-time modification of the axis extremes.
      Parameters:
      minimum - New minimum value.
      maximum - New maximum value.
      redraw - Whether or not to redraw the chart.
      animate - Whether or not to animate the rescaling.
    • getConfiguration

      public MapConfiguration getConfiguration()
      Returns the configuration this axis is bound to.
      Returns:
      The configuration.
    • setConfiguration

      public void setConfiguration(MapConfiguration configuration)
      Sets the configuration this axis is bound to. This method is automatically called by configuration, when the axis is added to it.
      Parameters:
      configuration - Configuration this object is linked to.
    • getEndOnTick

      public abstract Boolean getEndOnTick()

      getEndOnTick.

      Returns:
      a Boolean object.
      See Also:
      • setEndOnTick(Boolean)
    • getGridLineColor

      public abstract Color getGridLineColor()

      getGridLineColor.

      Returns:
      a Color object.
      See Also:
    • setGridLineColor

      public abstract void setGridLineColor(Color gridLineColor)
      Color of the grid lines extending the ticks across the plot area.
      Parameters:
      gridLineColor - a Color object.
    • getGridLineDashStyle

      public abstract DashStyle getGridLineDashStyle()

      getGridLineDashStyle.

      Returns:
      a DashStyle object.
      See Also:
    • setGridLineDashStyle

      public abstract void setGridLineDashStyle(DashStyle gridLineDashStyle)
      The dash or dot style of the grid lines.
      Parameters:
      gridLineDashStyle - a DashStyle object.
    • getGridLineWidth

      public abstract Number getGridLineWidth()

      getGridLineWidth.

      Returns:
      a Number object.
      See Also:
    • setGridLineWidth

      public abstract void setGridLineWidth(Number gridLineWidth)
      The width of the grid lines extending the ticks across the plot area.
      Parameters:
      gridLineWidth - a Number object.
    • getId

      public abstract String getId()

      getId.

      Returns:
      a String object.
      See Also:
    • setId

      public abstract void setId(String id)
      An id for the axis. This can be used after render time to get a pointer to the axis object through chart.get().
      Parameters:
      id - a String object.
    • getLabels

      public abstract Labels getLabels()

      getLabels.

      Returns:
      a Labels object.
      See Also:
    • setLabels

      public abstract void setLabels(Labels labels)
      The axis labels show the number or category for each tick.
      Parameters:
      labels - a Labels object.
    • getMaxPadding

      public abstract Number getMaxPadding()

      getMaxPadding.

      Returns:
      a Number object.
      See Also:
    • setMaxPadding

      public abstract void setMaxPadding(Number maxPadding)
      Padding of the max value relative to the length of the axis. A padding of 0.05 will make a 100px axis 5px longer. This is useful when you don't want the highest data value to appear on the edge of the plot area. When the axis' max option is set or a max extreme is set using axis.setExtremes(), the maxPadding will be ignored.
      Parameters:
      maxPadding - a Number object.
    • getMinPadding

      public abstract Number getMinPadding()

      getMinPadding.

      Returns:
      a Number object.
      See Also:
    • setMinPadding

      public abstract void setMinPadding(Number minPadding)
      Padding of the min value relative to the length of the axis. A padding of 0.05 will make a 100px axis 5px longer. This is useful when you don't want the lowest data value to appear on the edge of the plot area. When the axis' min option is set or a min extreme is set using axis.setExtremes(), the minPadding will be ignored.
      Parameters:
      minPadding - a Number object.
    • getMinorGridLineColor

      public abstract Color getMinorGridLineColor()

      getMinorGridLineColor.

      Returns:
      a Color object.
      See Also:
    • setMinorGridLineColor

      public abstract void setMinorGridLineColor(Color minorGridLineColor)
      Color of the minor, secondary grid lines.
      Parameters:
      minorGridLineColor - a Color object.
    • getMinorGridLineDashStyle

      public abstract DashStyle getMinorGridLineDashStyle()

      getMinorGridLineDashStyle.

      Returns:
      a DashStyle object.
      See Also:
    • setMinorGridLineDashStyle

      public abstract void setMinorGridLineDashStyle(DashStyle minorGridLineDashStyle)
      The dash or dot style of the minor grid lines.
      Parameters:
      minorGridLineDashStyle - a DashStyle object.
    • getMinorGridLineWidth

      public abstract Number getMinorGridLineWidth()

      getMinorGridLineWidth.

      Returns:
      a Number object.
      See Also:
    • setMinorGridLineWidth

      public abstract void setMinorGridLineWidth(Number minorGridLineWidth)
      Width of the minor, secondary grid lines.
      Parameters:
      minorGridLineWidth - a Number object.
    • getMinorTickColor

      public abstract Color getMinorTickColor()

      getMinorTickColor.

      Returns:
      a Color object.
      See Also:
    • setMinorTickColor

      public abstract void setMinorTickColor(Color minorTickColor)
      Color for the minor tick marks.
      Parameters:
      minorTickColor - a Color object.
    • getMinorTickInterval

      public abstract String getMinorTickInterval()

      getMinorTickInterval.

      Returns:
      a String object.
      See Also:
    • setMinorTickInterval

      public abstract void setMinorTickInterval(String minorTickInterval)

      Tick interval in scale units for the minor ticks. On a linear axis, if "auto", the minor tick interval is calculated as a fifth of the tickInterval. If null, minor ticks are not shown.

      On logarithmic axes, the unit is the power of the value. For example, setting the minorTickInterval to 1 puts one tick on each of 0.1, 1, 10, 100 etc. Setting the minorTickInterval to 0.1 produces 9 ticks between 1 and 10, 10 and 100 etc. A minorTickInterval of "auto" on a log axis results in a best guess, attempting to enter approximately 5 minor ticks between each major tick.

      If user settings dictate minor ticks to become too dense, they don't make sense, and will be ignored to prevent performance problems.

      On axes using categories, minor ticks are not supported.

      Parameters:
      minorTickInterval - a String object.
    • getMinorTickLength

      public abstract Number getMinorTickLength()

      getMinorTickLength.

      Returns:
      a Number object.
      See Also:
    • setMinorTickLength

      public abstract void setMinorTickLength(Number minorTickLength)
      The pixel length of the minor tick marks.
      Parameters:
      minorTickLength - a Number object.
    • getMinorTickPosition

      public abstract TickPosition getMinorTickPosition()

      getMinorTickPosition.

      Returns:
      a TickPosition object.
      See Also:
    • setMinorTickPosition

      public abstract void setMinorTickPosition(TickPosition minorTickPosition)
      The position of the minor tick marks relative to the axis line. Can be one of inside and outside.
      Parameters:
      minorTickPosition - a TickPosition object.
    • getMinorTickWidth

      public abstract Number getMinorTickWidth()

      getMinorTickWidth.

      Returns:
      a Number object.
      See Also:
    • setMinorTickWidth

      public abstract void setMinorTickWidth(Number minorTickWidth)
      The pixel width of the minor tick mark.
      Parameters:
      minorTickWidth - a Number object.
    • getReversed

      public abstract Boolean getReversed()

      getReversed.

      Returns:
      a Boolean object.
      See Also:
    • setReversed

      public abstract void setReversed(Boolean reversed)
      Whether to reverse the axis so that the highest number is closest to the origin.
      Parameters:
      reversed - a Boolean object.
    • getShowFirstLabel

      public abstract Boolean getShowFirstLabel()

      getShowFirstLabel.

      Returns:
      a Boolean object.
      See Also:
    • setShowFirstLabel

      public abstract void setShowFirstLabel(Boolean showFirstLabel)
      Whether to show the first tick label.
      Parameters:
      showFirstLabel - a Boolean object.
    • getShowLastLabel

      public abstract Boolean getShowLastLabel()

      getShowLastLabel.

      Returns:
      a Boolean object.
      See Also:
    • setShowLastLabel

      public abstract void setShowLastLabel(Boolean showLastLabel)
      Whether to show the last tick label.
      Parameters:
      showLastLabel - a Boolean object.
    • getStartOnTick

      public abstract Boolean getStartOnTick()

      getStartOnTick.

      Returns:
      a Boolean object.
      See Also:
    • setStartOnTick

      public abstract void setStartOnTick(Boolean startOnTick)
      Whether to force the axis to start on a tick. Use this option with the minPadding option to control the axis start.
      Parameters:
      startOnTick - a Boolean object.
    • getTickColor

      public abstract Color getTickColor()

      getTickColor.

      Returns:
      a Color object.
      See Also:
    • setTickColor

      public abstract void setTickColor(Color tickColor)
      Color for the main tick marks.
      Parameters:
      tickColor - a Color object.
    • getTickInterval

      public abstract Number getTickInterval()

      getTickInterval.

      Returns:
      a Number object.
      See Also:
    • setTickInterval

      public abstract void setTickInterval(Number tickInterval)

      The interval of the tick marks in axis units. When null, the tick interval is computed to approximately follow the tickPixelInterval on linear and datetime axes. On categorized axes, a null tickInterval will default to 1, one category. Note that datetime axes are based on milliseconds, so for example an interval of one day is expressed as 24 * 3600 * 1000.

      On logarithmic axes, the tickInterval is based on powers, so a tickInterval of 1 means one tick on each of 0.1, 1, 10, 100 etc. A tickInterval of 2 means a tick of 0.1, 10, 1000 etc. A tickInterval of 0.2 puts a tick on 0.1, 0.2, 0.4, 0.6, 0.8, 1, 2, 4, 6, 8, 10, 20, 40 etc.

      If the tickInterval is too dense for labels to be drawn, Highcharts may remove ticks.

      Parameters:
      tickInterval - a Number object.
    • getTickLength

      public abstract Number getTickLength()

      getTickLength.

      Returns:
      a Number object.
      See Also:
    • setTickLength

      public abstract void setTickLength(Number tickLength)
      The pixel length of the main tick marks.
      Parameters:
      tickLength - a Number object.
    • getTickPixelInterval

      public abstract Number getTickPixelInterval()

      getTickPixelInterval.

      Returns:
      a Number object.
      See Also:
    • setTickPixelInterval

      public abstract void setTickPixelInterval(Number tickPixelInterval)
      If tickInterval is null this option sets the approximate pixel interval of the tick marks. Not applicable to categorized axis.
      Parameters:
      tickPixelInterval - a Number object.
    • getTickPosition

      public abstract TickPosition getTickPosition()

      getTickPosition.

      Returns:
      a TickPosition object.
      See Also:
    • setTickPosition

      public abstract void setTickPosition(TickPosition tickPosition)
      The position of the major tick marks relative to the axis line. Can be one of inside and outside.
      Parameters:
      tickPosition - a TickPosition object.
    • getTickPositions

      public abstract Number[] getTickPositions()

      getTickPositions.

      Returns:
      an array of Number objects.
      See Also:
    • setTickPositions

      public abstract void setTickPositions(Number[] tickPositions)
      An array defining where the ticks are laid out on the axis. This overrides the default behaviour of tickPixelInterval and tickInterval.
      Parameters:
      tickPositions - an array of Number objects.
    • getTickWidth

      public abstract Number getTickWidth()

      getTickWidth.

      Returns:
      a Number object.
      See Also:
    • setTickWidth

      public abstract void setTickWidth(Number tickWidth)
      The pixel width of the major tick marks.
      Parameters:
      tickWidth - a Number object.