Skip to main content
Version: 4.0

Interface: TimeScaleOptions

Options for the time scale; the horizontal scale at the bottom of the chart that displays the time of data.

Properties​

rightOffset​

rightOffset: number

The margin space in bars from the right side of the chart.

Default Value​

0


barSpacing​

barSpacing: number

The space between bars in pixels.

Default Value​

6


minBarSpacing​

minBarSpacing: number

The minimum space between bars in pixels.

Default Value​

0.5


fixLeftEdge​

fixLeftEdge: boolean

Prevent scrolling to the left of the first bar.

Default Value​

false


fixRightEdge​

fixRightEdge: boolean

Prevent scrolling to the right of the most recent bar.

Default Value​

false


lockVisibleTimeRangeOnResize​

lockVisibleTimeRangeOnResize: boolean

Prevent changing the visible time range during chart resizing.

Default Value​

false


rightBarStaysOnScroll​

rightBarStaysOnScroll: boolean

Prevent the hovered bar from moving when scrolling.

Default Value​

false


borderVisible​

borderVisible: boolean

Show the time scale border.

Default Value​

true


borderColor​

borderColor: string

The time scale border color.

Default Value​

'#2B2B43'


visible​

visible: boolean

Show the time scale.

Default Value​

true


timeVisible​

timeVisible: boolean

Show the time, not just the date, in the time scale and vertical crosshair label.

Default Value​

false


secondsVisible​

secondsVisible: boolean

Show seconds in the time scale and vertical crosshair label in hh:mm:ss format for intraday data.

Default Value​

true


shiftVisibleRangeOnNewBar​

shiftVisibleRangeOnNewBar: boolean

Shift the visible range to the right (into the future) by the number of new bars when new data is added.

Note that this only applies when the last bar is visible.

Default Value​

true


tickMarkFormatter?​

optional tickMarkFormatter: TickMarkFormatter

Tick marks formatter can be used to customize tick marks labels on the time axis.

Default Value​

undefined


ticksVisible​

ticksVisible: boolean

Draw small vertical line on time axis labels.

Default Value​

false