Skip to main content
Version: Next

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.

defaultvalue 0


barSpacing

barSpacing: number

The space between bars in pixels.

defaultvalue 6


minBarSpacing

minBarSpacing: number

The minimum space between bars in pixels.

defaultvalue 0.5


fixLeftEdge

fixLeftEdge: boolean

Prevent scrolling to the left of the first bar.

defaultvalue false


fixRightEdge

fixRightEdge: boolean

Prevent scrolling to the right of the most recent bar.

defaultvalue false


lockVisibleTimeRangeOnResize

lockVisibleTimeRangeOnResize: boolean

Prevent changing the visible time range during chart resizing.

defaultvalue false


rightBarStaysOnScroll

rightBarStaysOnScroll: boolean

Prevent the hovered bar from moving when scrolling.

defaultvalue false


borderVisible

borderVisible: boolean

Show the time scale border.

defaultvalue true


borderColor

borderColor: string

The time scale border color.

defaultvalue '#2B2B43'


visible

visible: boolean

Show the time scale.

defaultvalue true


timeVisible

timeVisible: boolean

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

defaultvalue false


secondsVisible

secondsVisible: boolean

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

defaultvalue 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.

defaultvalue true


tickMarkFormatter

Optional tickMarkFormatter: TickMarkFormatter

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

defaultvalue undefined


ticksVisible

ticksVisible: boolean

Draw small vertical line on time axis labels.

defaultvalue true