charton API / @chart-on/core / index / AutoscaleRule
Interface: AutoscaleRule
Defined in: packages/core/src/scales.ts:399
How a scale adjusts the range it fits to the data, before margins. Prices in every mode, like fixedRange. Applied in this order: include, minSpan, centerOn. Only while there is visible data to fit.
Properties
centerOn?
optionalcenterOn?:number
Defined in: packages/core/src/scales.ts:401
Keep this price in the middle, e.g. 0 for an oscillator around zero. Log scales center on a ratio, and skip values at or below zero.
include?
optionalinclude?:number[]
Defined in: packages/core/src/scales.ts:403
Prices the range always reaches, e.g. a target level. Log scales skip values at or below zero.
minSpan?
optionalminSpan?:number
Defined in: packages/core/src/scales.ts:405
Smallest price span to fit, so flat data does not zoom into noise. The range widens around its middle.