Options
All
  • Public
  • Public/Protected
  • All
Menu

Class VisibleTicks

Class which is used to style Axis Ticks. Use with Axis.setTickStyle

Instances of VisibleTicks are immutable, meaning that its setters don't modify the object, but instead return a completely new modified object.

When creating a new VisibleTicks object from scratch, parameters can be passed like follows:

  • new VisibleTicks({ labelFillStyle: new SolidFill({ color: ColorHEX('#F00'), tickLength: 8 })

Index

Constructors

constructor

  • When creating a new VisibleTicks object from scratch, parameters can be passed like follows:

    • new VisibleTicks({ labelFillStyle: new SolidFill({ color: ColorHEX('#F00'), tickLength: 8 })

    Parameters

    • Optional props: Partial<TickStyleProperties>

      Optional object containing parameters for creation of VisibleTicks

    Returns VisibleTicks

Methods

getGridStrokeLength

  • getGridStrokeLength(): number
  • Get length of GridStroke.

    Returns number

    Length of GridStroke, where 1 = full and 0 = zero.

getGridStrokeStyle

  • Get style of GridStrokes.

    Returns SolidLine

    SolidLine object

getLabelFillStyle

  • getLabelFillStyle(): VisibleFill
  • Get fill style of Label.

    Returns VisibleFill

    Fill style of Label as a VisibleFill object

getLabelFont

  • Get font of Labels.

    Returns FontSettings

    FontSettings object

getLabelPadding

  • getLabelPadding(): pixel
  • Get padding after label as pixels.

    Returns pixel

    Padding after label as pixels.

getTickLength

  • getTickLength(): pixel
  • Get length of Ticks.

    Returns pixel

    Length of Ticks as pixels

getTickPadding

  • getTickPadding(): pixel
  • Get padding after Tick as pixels.

    Returns pixel

    Padding after Tick as pixels.

getTickStyle

  • Get style of Ticks.

    Returns SolidLine

    SolidLine object

setGridStrokeLength

  • setGridStrokeLength(length: number): this
  • Construct a new VisibleTicks object based on this one, but with modified gridstroke length.

    Parameters

    • length: number

      Length of GridStroke, where 1 = full and 0 = zero.

    Returns this

    New VisibleTicks object

setGridStrokeStyle

  • Construct a new VisibleTicks object based on this one, but with modified GridStroke style.

    Example usage:

    Desired result Argument
    Specified SolidLine new SolidLine({ thickness: 2, fillStyle: new SolidFill({ color: ColorHEX('#F00') }) })
    Changed thickness (solidLine) => solidLine.setThickness(5)
    Hidden emptyLine Not supported, to hide only GridStrokes use transparentLine

    Parameters

    Returns this

    New VisibleTicks object

setLabelFillStyle

  • Set fill style of Labels.

    Example usage:

    Desired result Argument
    Specified FillStyle new SolidFill({ color: ColorHEX('#F00') })
    Changed transparency (solidFill) => solidFill.setA(80)
    Hidden emptyFill Not supported, to hide only Labels use transparentFill

    Parameters

    Returns this

    New VisibleTicks object

setLabelFont

  • Construct a new VisibleTicks object based on this one, but with modified Label font.

    Example usage:

    Desired result Argument
    Specified FontSettings new FontSettings({ size: 24, style: 'italic' })
    Set to bold (fontSettings) => fontSettings.setWeight('bold')

    Parameters

    Returns this

    New VisibleTicks object

setLabelPadding

  • setLabelPadding(padding: pixel): this
  • Set padding after label as pixels.

    Parameters

    • padding: pixel

      Padding after label as pixels.

    Returns this

    New VisibleTicks object with modified Label padding

setTickLength

  • setTickLength(length: pixel): this
  • Set length of Ticks.

    Parameters

    • length: pixel

      Length of Ticks as pixels.

    Returns this

    New VisibleTicks object

setTickPadding

  • setTickPadding(padding: pixel): this
  • Set padding after Tick as pixels.

    Parameters

    • padding: pixel

      Padding after Tick as pixels.

    Returns this

    New VisibleTicks object with modified Tick padding

setTickStyle

  • Construct a new VisibleTicks object based on this one, but with modified Tick style.

    Example usage:

    Desired result Argument
    Specified SolidLine new SolidLine({ thickness: 2, fillStyle: new SolidFill({ color: ColorHEX('#F00') }) })
    Changed thickness (solidLine) => solidLine.setThickness(5)
    Hidden emptyLine Not supported, to hide only Ticks use transparentLine

    Parameters

    Returns this

    New VisibleTicks object

Static Record

  • Record(defaultValues: TProps, name?: undefined | string): Factory<TProps>
  • Unlike other types in Immutable.js, the Record() function creates a new Record Factory, which is a function that creates Record instances.

    See above for examples of using Record().

    Note: Record is a factory function and not a class, and does not use the new keyword during construction.

    Type parameters

    • TProps

    Parameters

    • defaultValues: TProps
    • Optional name: undefined | string

    Returns Factory<TProps>