Class Axis.AxisBuilder

java.lang.Object
tech.tablesaw.plotly.components.Axis.AxisBuilder
Enclosing class:
Axis

public static class Axis.AxisBuilder extends Object
  • Method Details

    • title

      public Axis.AxisBuilder title(String title)
    • titleFont

      public Axis.AxisBuilder titleFont(Font titleFont)
    • type

      public Axis.AxisBuilder type(Axis.Type type)
    • categoryOrder

      public Axis.AxisBuilder categoryOrder(Axis.CategoryOrder categoryOrder)
    • domain

      public Axis.AxisBuilder domain(float start, float end)
    • visible

      public Axis.AxisBuilder visible(boolean visible)
    • side

      public Axis.AxisBuilder side(Axis.Side side)
    • overlaying

      public Axis.AxisBuilder overlaying(ScatterTrace.YAxis axisToOverlay)
      Instructs plotly to overly the trace with this axis on top of a trace with another axis
      Parameters:
      axisToOverlay - The axis we want to overlay
      Returns:
      this AxisBuilder
    • fixedRange

      public Axis.AxisBuilder fixedRange(boolean fixedRange)
      Determines whether or not this axis is zoom-able. If True, then zoom is disabled.
    • color

      public Axis.AxisBuilder color(String color)
    • font

      public Axis.AxisBuilder font(Font font)
    • rangeMode

      public Axis.AxisBuilder rangeMode(Axis.RangeMode rangeMode)
      If "normal", the range is computed in relation to the extrema of the input data. If "tozero"`, the range extends to 0, regardless of the input data If "nonnegative", the range is non-negative, regardless of the input data.

      The default is normal.

    • spikes

      public Axis.AxisBuilder spikes(Axis.Spikes spikes)
    • autoRange

      public Axis.AxisBuilder autoRange(Axis.AutoRange autoRange)
      Determines whether or not the range of this axis is computed in relation to the input data. See `rangemode` for more info. If `range` is provided, then `autorange` is set to "False".
    • range

      public Axis.AxisBuilder range(Object[] range)
      Sets the range of this axis. If the axis `type` is "log", then you must take the log of your desired range (e.g. to set the range from 1 to 100, set the range from 0 to 2).

      If the axis `type` is "date", it should be date strings, like date data, though Date objects and unix milliseconds will be accepted and converted to strings. If the axis `type` is "category", it should be numbers, using the scale where each category is assigned a serial number from zero in the order it appears.

    • range

      public Axis.AxisBuilder range(Object low, Object high)
      Sets the range of this axis. If the axis `type` is "log", then you must take the log of your desired range (e.g. to set the range from 1 to 100, set the range from 0 to 2).

      If the axis `type` is "date", it should be date strings, like date data, though Date objects and unix milliseconds will be accepted and converted to strings. If the axis `type` is "category", it should be numbers, using the scale where each category is assigned a serial number from zero in the order it appears.

    • constrain

      public Axis.AxisBuilder constrain(Axis.Constrain constrain)
    • constrainToward

      public Axis.AxisBuilder constrainToward(Axis.ConstrainToward constrainToward)
    • scaleRatio

      public Axis.AxisBuilder scaleRatio(double scaleRatio)
      If this axis is linked to another by `scaleanchor`, this determines the pixel to unit scale ratio. For example, if this value is 10, then every unit on this axis spans 10 times the number of pixels as a unit on the linked axis. Use this for example to create an elevation profile where the vertical scale is exaggerated a fixed amount with respect to the horizontal.
      Parameters:
      scaleRatio - a number >= 1
      Returns:
      this AxisBuilder
    • tickSettings

      public Axis.AxisBuilder tickSettings(TickSettings tickSettings)
      Defines all the settings related to the display of tick marks on this axis
    • lineWidth

      public Axis.AxisBuilder lineWidth(int lineWidth)
    • zeroLineWidth

      public Axis.AxisBuilder zeroLineWidth(int zeroLineWidth)
    • gridWidth

      public Axis.AxisBuilder gridWidth(int width)
    • lineColor

      public Axis.AxisBuilder lineColor(String color)
    • gridColor

      public Axis.AxisBuilder gridColor(String color)
    • zeroLineColor

      public Axis.AxisBuilder zeroLineColor(String color)
    • showLine

      public Axis.AxisBuilder showLine(boolean showLine)
    • showGrid

      public Axis.AxisBuilder showGrid(boolean showGrid)
    • showZeroLine

      public Axis.AxisBuilder showZeroLine(boolean zeroLine)
    • rangeslider

      public Axis.AxisBuilder rangeslider(String slider)
    • build

      public Axis build()