Options
All
  • Public
  • Public/Protected
  • All
Menu
summary

The TickProvider is a base class for calculating ticks (interval between major and minor gridlines, ticks and labels).

description

TickProviders are responsible for calculating the interval between major and minor gridlines, ticks and labels.

The method {@getMajorTicks} returns an array of major ticks (data-values values where SciChart will place labels and major gridlines). The method {@getMinorTicks} returns an array of minor ticks (data-values values where SciChart will place minor gridlines). The method {@attachedToAxis} is called when the TickProvider is attached to an Axis.

Override these methods to create custom implementations of Tick intervals in SciChart or use our built-in NumericTickProvider

remarks

TickProviders are shared between 2D & 3D Charts. See also NumericTickProvider for a concrete implementation.

Hierarchy

Index

Properties

parentAxis

parentAxis: AxisCore

Gets the parent Axis this TickProvider is attached to

Methods

attachedToAxis

  • Called when the TickProvider is attached to an Axis

    Parameters

    Returns void

Abstract getMajorTicks

  • getMajorTicks(minorDelta: number, majorDelta: number, visibleRange: NumberRange): number[]
  • summary

    Gets an array of major ticks (data-values values where SciChart will place labels and major gridlines).

    description

    Major ticks are data-values where we will place the major gridlines and labels. For example. if the Axis has a visibleRange of 100..200 and we want to place gridlines at 100,120,140,160,180,200, then the getMajorTicks() method should return an array with [100,120,140,160,180,200].

    link

    AxisCore | Axis}

    Parameters

    Returns number[]

    The array of major ticks, e.g. if we want to place gridlines at 100,120,140,160,180,200, then the getMajorTicks() method should return an array with [100,120,140,160,180,200].

Abstract getMinorTicks

  • getMinorTicks(minorDelta: number, majorDelta: number, visibleRange: NumberRange): number[]
  • summary

    Gets an array of minor ticks (data-values values where SciChart will place minor gridlines).

    description

    Minor ticks are data-values where we will place the minor gridlines. For example. if the Axis has a visibleRange of 100..200 and we want to place minor gridlines every 5, then the getMinorTicks() method should return an array with [105, 110, 115] etc...

    remarks

    getMinorTicks should not include locations where major ticks lie.

    link

    AxisCore | Axis}

    Parameters

    Returns number[]

    The array of minor ticks, e.g. if we want to place minor gridlines every 5, then the getMinorTicks() method should return an array with [105, 110, 115] etc...

Generated using TypeDoc