Const
Formats number like "2×10¹⁰"
Alternate, built-in formatting for logarithmic ticks. Better suited especially for applications with zooming.
// Example, enable extreme ticks with exponent formatting
chart
.getDefaultAxisX()
.setTickStrategy(AxisTickStrategies.Numeric, (ticks) =>
ticks
.setMajorFormattingFunction(FormattingFunctions.LogarithmicExponentsRounded)
.setMinorFormattingFunction(FormattingFunctions.LogarithmicExponents)
)
Optional
locale: stringFormats number like "10¹⁰"
Alternate, built-in formatting for logarithmic ticks. Better suited especially for applications with zooming.
// Example, enable extreme ticks with exponent formatting
chart
.getDefaultAxisX()
.setTickStrategy(AxisTickStrategies.Numeric, (ticks) =>
ticks
.setMajorFormattingFunction(FormattingFunctions.LogarithmicExponentsRounded)
.setMinorFormattingFunction(FormattingFunctions.LogarithmicExponents)
)
Optional
locale: stringBeta
Formats number like "2.13×10¹⁰"
Recommended to be used together with "extreme ticks" when logarithmic ticks are paired with requirement of zooming far in.
// Example, enable extreme ticks with special formatting
chart
.getDefaultAxisX()
.setTickStrategy(AxisTickStrategies.Numeric, (ticks) =>
ticks
.setExtremeTickStyle(chart.getTheme().xAxisNumericTicks.majorTickStyle)
.setExtremeFormattingFunction(FormattingFunctions.LogarithmicExtreme),
)
Optional
locale: stringBeta
Default formatting function for logarithmic axis.
Formats values like "0.1"
, "1"
, "10"
and so on.
Optional
locale: stringFormats a number.
Value formated as string
Value on range to format
FormatingRange
Formats a number by range-dependant rounding and usage of units.
Value formated as string with units
Value on range to format
FormatingRange
Enum-like object for implementations of default Formatting functions.