Axis Tick Strategy to prevent any and all automatic tick creation.

Still exposes way to configure cursor formatting of values along the Axis.

Axis tick strategy is selected with setTickStrategy method:

 Axis.setTickStrategy(AxisTickStrategies.Empty, (strategy) => strategy)

All configuration of automatically created ticks is done using the callback from setTickStrategy, see example below for the idea:

 // Specify TickStrategy and use callback to style automatic ticks.
Axis.setTickStrategy(AxisTickStrategies.Numeric, (numericTicks) => numericTicks
// All methods of `NumericTickStrategy` can be used here for styling ticks.
.setMajorTickStyle((majorTicks) => majorTicks
.setLabelFont((font) => font
.setWeight('bold')
)
)
)

All available strategies for automatic Axis ticks creation can be referenced via AxisTickStrategies.

Hierarchy

  • EmptyTickStrategyRecord
    • EmptyTickStrategy

Implements

  • MutableAxisTickStrategy

Constructors

  • Parameters

    • Optional values: Iterable<[string, unknown]> | Partial<EmptyTickStrategyProperties>

    Returns EmptyTickStrategy

Properties

cursorFormatter: undefined | FormattingFunction

Cursor formatter.

This controls the formatting used by:

  • Default cursor result table formatters.
  • Default cursor tick formatters along Axis which uses this TickStrategy.
  • Axis.formatValue method of the Axis which uses this TickStrategy.

undefined means to use default cursor formatting.

 // Example value, custom cursor formatter
cursorFormatter: (value, range, locale) => value.toFixed(3)

Methods

  • Get cursor formatter of this NumericTickStrategy object.

    Returns

    FormattingFunction as set by user, or undefined to indicate that the default numeric cursor formatting is configured.

    Returns undefined | FormattingFunction

  • Set cursor formatter for this TickStrategy object.

    This will override the date time formatting used by:

    • Default cursor result table formatters.
    • Default cursor tick formatters along Axis which uses this TickStrategy.
    • Axis.formatValue method of the Axis which uses this TickStrategy.
     // Example syntax, custom cursor formatting.
    Axis.setTickStrategy(AxisTickStrategies.Numeric, (ticks) => ticks
    .setCursorFormatter((value, range, locale) =>
    value.toFixed(3)
    )
    )

    Returns

    New NumericTickStrategy object.

    Parameters

    • formatter: undefined | FormattingFunction

      FormattingFunction or undefined to use default numeric cursor formatting.

    Returns EmptyTickStrategy