charton API / @chart-on/core / index / PriceScaleSettings
Interface: PriceScaleSettings
Defined in: packages/core/src/chart.ts:951
Settings of one price scale; see setPriceScaleOptions.
Extended by
Properties
autoScale
autoScale:
boolean
Defined in: packages/core/src/chart.ts:957
autoscaleRule
autoscaleRule:
AutoscaleRule|null
Defined in: packages/core/src/chart.ts:986
Adjust the range fitted to the data: keep a price centred (centerOn), always reach some prices (include) and fit at least a span (minSpan). Prices in every mode; fixedRange wins. Null fits the data as it is.
fixedRange
fixedRange: {
max:number;min:number; } |null
Defined in: packages/core/src/chart.ts:972
While autoscale is on, show exactly this price range instead of fitting the data, e.g. { min: 0, max: 100 } for an oscillator pane. Null fits the data. Prices in every mode (percent and indexed too). Setting one at or below zero on a log scale throws; switching to log keeps it but ignores it (the data is fitted) until the scale leaves log mode.
invert
invert:
boolean
Defined in: packages/core/src/chart.ts:956
Higher prices lower down.
lockPriceToBarRatio
lockPriceToBarRatio:
boolean
Defined in: packages/core/src/chart.ts:993
Zooming the time axis scales prices by the same factor, so angles of lines and drawings stay put, also through fitContent and the visible range setters. Turns autoscale off; turning autoscale on (including setPriceScaleMode and resetView) unlocks it.
marginBottom?
optionalmarginBottom?:number|null
Defined in: packages/core/src/chart.ts:964
marginTop?
optionalmarginTop?:number|null
Defined in: packages/core/src/chart.ts:963
Fractions of the pane height kept empty above and below the data. A side the chart sizes itself (see addPane) is left out when read; set null to give a side back to the chart.
mode
mode:
PriceScaleMode
Defined in: packages/core/src/chart.ts:954
percentBase
percentBase:
PercentBase
Defined in: packages/core/src/chart.ts:980
What percent and indexed modes measure from (default 'firstVisible'): 'sessionOpen', the open of the trading day holding the newest visible bar; 'previousClose', the close before that day; { time }, the close of the first bar at or after time, marked on the time axis. Every series on the scale, and compared symbols linked to it, measure from the same bar.
priceToBarRatio
priceToBarRatio:
number|null
Defined in: packages/core/src/chart.ts:1000
The locked ratio: price-scale coordinate units per bar width (log10 units in log mode). Read it to save it, pass it back to restore it. Null while unlocked, or locked but not laid out yet; with lockPriceToBarRatio: true, null locks at the current ratio.
side
side:
PriceScaleSide
Defined in: packages/core/src/chart.ts:953
Axis side; 'none' overlays the pane with no visible axis.