charton API / @chart-on/core / index / LayoutPriceScale
Interface: LayoutPriceScale
Defined in: packages/core/src/layout.ts:33
One price scale of a saved pane.
Extends
Properties
autoScale
autoScale:
boolean
Defined in: packages/core/src/chart.ts:957
Inherited from
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.
Inherited from
PriceScaleSettings.autoscaleRule
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.
Inherited from
invert
invert:
boolean
Defined in: packages/core/src/chart.ts:956
Higher prices lower down.
Inherited from
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.
Inherited from
PriceScaleSettings.lockPriceToBarRatio
marginBottom?
optionalmarginBottom?:number|null
Defined in: packages/core/src/chart.ts:964
Inherited from
PriceScaleSettings.marginBottom
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.
Inherited from
mode
mode:
PriceScaleMode
Defined in: packages/core/src/chart.ts:954
Inherited from
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.
Inherited from
PriceScaleSettings.percentBase
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.
Inherited from
PriceScaleSettings.priceToBarRatio
range?
optionalrange?:object
Defined in: packages/core/src/layout.ts:35
The price range shown, saved only while autoScale is off.
max
max:
number
min
min:
number
side
side:
PriceScaleSide
Defined in: packages/core/src/chart.ts:953
Axis side; 'none' overlays the pane with no visible axis.