Optional values: Iterable<[string, unknown]> | Partial<NumericTickStrategyProperties>Readonly cursorCursor formatter.
This controls the formatting used by:
TickStrategy.Axis.formatValue method of the Axis which uses this TickStrategy.undefined means to use default Numeric cursor formatting.
// Example value, custom cursor formatter
cursorFormatter: (value, range, locale) => value.toFixed(3)
Optional Readonly extremeFormatting function used for extreme ticks.
Use FormattingFunctions to select available ones or define custom function.
undefined will result in default selection.
Readonly extremeStyle of Extreme ticks (start & end of Axis).
To disable extreme ticks, set to emptyTick.
Readonly Beta fallIf true (default) if at any time the axis would display only 1 or 0 tick labels, then automatically fallback to "extreme ticks" behavior
(display axis start + end).
Aim is to avoid very unfortunate cases where only 1 tick label fits into the chart. This kind of axis is practically unreadable, as the value range can not be perceived.
Introduced in v7.0.0. May be changed according to user feedback.
Readonly formattingOptional coordinate to offset from tick coordinates when formatting tick labels and default cursor labels.
If supplied, the value of formattingOffset will be added to every coordinate before formatting.
This can be useful for offsetting displayed data ranges in cases where actual data can't be practically rendered due to extremely large numbers for example.
// Example, specify formatting offset.
Axis.setTickStrategy(AxisTickStrategies.Numeric, (ticks) => ticks
// Will result in `0` being formatted as `1000000`
.setFormattingOffset(1000000)
)
Optional Readonly majorFormatting function used for major ticks.
Use FormattingFunctions to select available ones or define custom function.
undefined will result in default selection.
Readonly majorStyle of Major ticks.
Optional Readonly minorFormatting function used for minor ticks.
Use FormattingFunctions to select available ones or define custom function.
undefined will result in default selection.
Readonly minorStyle of Minor ticks.
To disable minor ticks, set to emptyTick.
Get cursor formatter of this NumericTickStrategy object.
FormattingFunction as set by user, or undefined to indicate that the default numeric cursor formatting is configured.
Get extreme ticks formatting function of this NumericTickStrategy object.
Formatting Function.
Get formattingOffset of Tick strategy.
formattingOffset is an optional coordinate to offset from tick coordinates when formatting tick labels and default cursor labels.
If supplied, the value of formattingOffset will be added to every coordinate before formatting.
This can be useful for offsetting displayed data ranges in cases where actual data can't be practically rendered due to extremely large numbers for example.
// Example, specify formatting offset.
Axis.setTickStrategy(AxisTickStrategies.Numeric, (ticks) => ticks
// Will result in `0` being formatted as `1000000`
.setFormattingOffset(1000000)
)
Get major ticks formatting function of this NumericTickStrategy object.
Formatting Function.
Get minor ticks formatting function of this NumericTickStrategy object.
Formatting Function.
Set cursor formatter for this TickStrategy object.
This will override the date time formatting used by:
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)
)
)
New NumericTickStrategy object.
FormattingFunction or undefined to use default numeric cursor formatting.
Set extreme ticks formatting function of this NumericTickStrategy object.
New NumericTickStrategy object.
Formatting function to use with this NumericTickStrategy object.
Construct a new NumericTickStrategy object based on this one, but with modified extreme tick style.
Example usage:
Disable extreme ticks:
Axis.setTickStrategy(
AxisTickStrategies.Numeric,
( tickStrategy: NumericTickStrategy ) => tickStrategy
.setExtremeTickStyle( emptyTick )
)
Set font of extreme ticks:
Axis.setTickStrategy(
AxisTickStrategies.Numeric,
( tickStrategy: NumericTickStrategy ) => tickStrategy
.setExtremeTickStyle(( tickStyle: TickStyle ) => tickStyle
.setLabelFont(( font ) => font
.setWeight( 'bold' )
)
)
)
New NumericTickStrategy object.
Either a TickStyle object or a function, which creates a new one based on the existing style. Passing a function only works if the existing style is not emptyTick.
Beta
See NumericTickStrategyProperties.fallBackToExtremeTicksAutomatically for details.
Boolean
Introduced in v7.0.0. May be changed according to user feedback.
Utility method for setting formatting function of all numeric tick levels (extreme, major, minor) as well as cursor.
Each formatting target can be individually overridden with following methods:
New NumericTickStrategy object.
Function that formats a tick value to text.
Construct a new NumericTickStrategy object based on this one, but with modified formatting offset.
formattingOffset is an optional coordinate to offset from tick coordinates when formatting tick labels and default cursor labels.
If supplied, the value of formattingOffset will be added to every coordinate before formatting.
This can be useful for offsetting displayed data ranges in cases where actual data can't be practically rendered due to extremely large numbers for example.
// Example, specify formatting offset.
Axis.setTickStrategy(AxisTickStrategies.Numeric, (ticks) => ticks
// Will result in `0` being formatted as `1000000`
.setFormattingOffset(1000000)
)
Set major ticks formatting function of this NumericTickStrategy object.
New NumericTickStrategy object.
Formatting function to use with this NumericTickStrategy object.
Construct a new NumericTickStrategy object based on this one, but with modified major tick style.
Example usage:
Set font of major ticks:
Axis.setTickStrategy(
AxisTickStrategies.Numeric,
( tickStrategy: NumericTickStrategy ) => tickStrategy
.setMajorTickStyle(( tickStyle ) => tickStyle
.setLabelFont(( font ) => font
.setWeight( 'bold' )
)
)
)
New NumericTickStrategy object.
Either a TickStyle object or a function, which creates a new one based on the existing style.
Set minor ticks formatting function of this NumericTickStrategy object.
New NumericTickStrategy object.
Formatting function to use with this NumericTickStrategy object.
Construct a new NumericTickStrategy object based on this one, but with modified minor tick style.
Example usage:
Disable minor ticks:
Axis.setTickStrategy(
AxisTickStrategies.Numeric,
( tickStrategy: NumericTickStrategy ) => tickStrategy
.setMinorTickStyle( emptyTick )
)
Set font of minor ticks:
Axis.setTickStrategy(
AxisTickStrategies.Numeric,
( tickStrategy: NumericTickStrategy ) => tickStrategy
.setMinorTickStyle(( tickStyle: TickStyle ) => tickStyle
.setLabelFont(( font ) => font
.setWeight( 'bold' )
)
)
)
New NumericTickStrategy object.
Either a TickStyle object or a function, which creates a new one based on the existing style. Passing a function only works if the existing style is not emptyTick.
This is a convenience function which simultaneously applies to both setMajorTickStyle and setMinorTickStyle, as well as the setExtremeTickStyle if they are not hidden (emptyTick).
New NumericTickStrategy object.
Either a TickStyle object or a function, which creates a new one based on the existing style.
Axis Tick Strategy that is designed for depicting numeric values of all magnitudes.
NumericTickStrategyis the default selection for all Axes.Axis interval ranges supported by
NumericTickStrategy:10e-9Note, 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:
All configuration of automatically created ticks is done using the callback from
setTickStrategy, see example below for the idea:All available strategies for automatic Axis ticks creation can be referenced via AxisTickStrategies.