Class CartesianTicks

java.lang.Object
org.primefaces.model.charts.axes.cartesian.CartesianTicks
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
CartesianCategoryTicks, CartesianLinearTicks

public abstract class CartesianTicks extends Object implements Serializable
Common ticks options for cartesian types
See Also:
  • Constructor Details

    • CartesianTicks

      public CartesianTicks()
  • Method Details

    • isAutoSkip

      public boolean isAutoSkip()
      Gets the autoSkip
      Returns:
      autoSkip
    • setAutoSkip

      public void setAutoSkip(boolean autoSkip)
      Sets the autoSkip
      Parameters:
      autoSkip - If true, automatically calculates how many labels that can be shown and hides labels accordingly. Turn it off to show all labels no matter what
    • getAutoSkipPadding

      public Number getAutoSkipPadding()
      Gets the autoSkipPadding
      Returns:
      autoSkipPadding
    • setAutoSkipPadding

      public void setAutoSkipPadding(Number autoSkipPadding)
      Sets the autoSkipPadding
      Parameters:
      autoSkipPadding - Padding between the ticks on the horizontal axis when autoSkip is enabled. Note: Only applicable to horizontal scales.
    • getLabelOffset

      public Number getLabelOffset()
      Gets the labelOffset
      Returns:
      labelOffset
    • setLabelOffset

      public void setLabelOffset(Number labelOffset)
      Sets the labelOffset
      Parameters:
      labelOffset - Distance in pixels to offset the label from the centre point of the tick (in the y direction for the x axis, and the x direction for the y axis). Note: this can cause labels at the edges to be cropped by the edge of the canvas
    • getMaxRotation

      public Number getMaxRotation()
      Gets the maxRotation
      Returns:
      maxRotation
    • setMaxRotation

      public void setMaxRotation(Number maxRotation)
      Sets the maxRotation
      Parameters:
      maxRotation - Maximum rotation for tick labels when rotating to condense labels. Note: Rotation doesn't occur until necessary. Note: Only applicable to horizontal scales.
    • getMinRotation

      public Number getMinRotation()
      Gets the minRotation
      Returns:
      minRotation
    • setMinRotation

      public void setMinRotation(Number minRotation)
      Sets the minRotation
      Parameters:
      minRotation - Minimum rotation for tick labels. Note: Only applicable to horizontal scales.
    • isMirror

      public boolean isMirror()
      Gets the mirror
      Returns:
      mirror
    • setMirror

      public void setMirror(boolean mirror)
      Sets the mirror
      Parameters:
      mirror - Flips tick labels around axis, displaying the labels inside the chart instead of outside. Note: Only applicable to vertical scales
    • getPadding

      public Number getPadding()
      Gets the padding
      Returns:
      padding
    • setPadding

      public void setPadding(Number padding)
      Sets the padding
      Parameters:
      padding - Padding between the tick label and the axis. When set on a vertical axis, this applies in the horizontal (X) direction. When set on a horizontal axis, this applies in the vertical (Y) direction.
    • encode

      public String encode() throws IOException
      Write the common ticks options
      Returns:
      options as JSON object
      Throws:
      IOException - If an I/O error occurs