AxisTickStrategies: {
    DateTime: "DateTime";
    Empty: "Empty";
    Numeric: "Numeric";
    Time: "Time";
} = ...

Collection of available AxisTickStrategies.

AxisTickStrategies modify logic of drawing Axis Ticks and formatting to better suit different user applications. For example, a DateTime Axis is created by selecting AxisTickStrategies.DateTime.

Type declaration

  • DateTime: "DateTime"

    Axis Tick Strategy that is designed for depicting date and time.

    Axis values are interpreted as UNIX timestamps similarly as with JavaScript Date API.

    https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date

    Axis interval ranges supported by DateTimeTickStrategy:

    • Minimum: 1 second (1000).
    • Maximum: 1000 years (really big number).

    Note, that available axis interval ranges can be also limited by the type of Axis, refer to Axis documentation for more information.

    Axis tick strategy is selected with setTickStrategy method:

     Axis.setTickStrategy(AxisTickStrategies.DateTime, (dateTimeTicks) => dateTimeTicks)
    

    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.DateTime, (dateTimeTicks) => dateTimeTicks
    // All methods of `DateTimeTickStrategy` can be used here for styling ticks.
    .setMajorTickStyle((majorTicks) => majorTicks
    .setLabelFont((font) => font
    .setWeight('bold')
    )
    )
    )

    For configuration API, see DateTimeTickStrategy.

  • Empty: "Empty"

    Disables all automatic creation of Axis ticks.

    CustomTicks can still be created manually.

    Example usage:

    Axis.setTickStrategy( AxisTickStrategies.Empty )
    
  • Numeric: "Numeric"

    Axis Tick Strategy that is designed for depicting numeric values of all magnitudes.

    NumericTickStrategy is the default selection for all Axes.

    Axis interval ranges supported by NumericTickStrategy:

    • Minimum: 10e-9
    • Maximum: Unlimited.

    Note, that available axis interval ranges can be also limited by the type of Axis, refer to Axis documentation for more information.

    Axis tick strategy is selected with setTickStrategy method:

     Axis.setTickStrategy(AxisTickStrategies.Numeric, (numericTicks) => numericTicks)
    

    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')
    )
    )
    )

    For configuration API, see NumericTickStrategy.

  • Time: "Time"

    Axis Tick Strategy that is designed for depicting time ranges between hundreds of hours to individual nanoseconds.

    Axis values are interpreted as milliseconds, for example:

    • 0 -> 00:00:00
    • 1 000 -> 00:00:01
    • 3 600 000 -> 01:00:00
    • 1 -> 00:00:00.001
    • 0.001 -> 00:00:00.000001

    When TimeTickStrategy is active, Axis interval will be always restricted to max. 100 hours interval and min. 100 nanoseconds interval.

    Axis tick strategy is selected with setTickStrategy method:

     Axis.setTickStrategy(AxisTickStrategies.Time, (timeTicks) => timeTicks)
    

    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.Time, (timeTicks) => timeTicks
    // All methods of `TimeTickStrategy` can be used here for styling ticks.
    .setMajorTickStyle((majorTicks) => majorTicks
    .setLabelFont((font) => font
    .setWeight('bold')
    )
    )
    )

    For configuration API, see TimeTickStrategy.