Skip to main content
Version: 3.8

Interface: PriceScaleOptions

Structure that describes price scale options

Properties

autoScale

autoScale: boolean

Autoscaling is a feature that automatically adjusts a price scale to fit the visible range of data. Note that overlay price scales are always auto-scaled.

defaultvalue true


mode

mode: PriceScaleMode

Price scale mode.

defaultvalue PriceScaleMode.Normal


invertScale

invertScale: boolean

Invert the price scale, so that a upwards trend is shown as a downwards trend and vice versa. Affects both the price scale and the data on the chart.

defaultvalue false


alignLabels

alignLabels: boolean

Align price scale labels to prevent them from overlapping.

defaultvalue true


scaleMargins

scaleMargins: PriceScaleMargins

Price scale margins.

defaultvalue { bottom: 0.1, top: 0.2 }

example

chart.priceScale('right').applyOptions({
scaleMargins: {
top: 0.8,
bottom: 0,
},
});

borderVisible

borderVisible: boolean

Set true to draw a border between the price scale and the chart area.

defaultvalue true


borderColor

borderColor: string

Price scale border color.

defaultvalue '#2B2B43'


entireTextOnly

entireTextOnly: boolean

Show top and bottom corner labels only if entire text is visible.

defaultvalue false


visible

visible: boolean

Indicates if this price scale visible. Ignored by overlay price scales.

defaultvalue true for the right price scale and false for the left


drawTicks

drawTicks: boolean

Draw small horizontal line on price axis labels.

defaultvalue true