Skip to main content
Version: 4.2

Interface: TimeScaleOptions

Extended time scale options for time-based horizontal scale

Hierarchy

Properties

rightOffset

rightOffset: number

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

Default Value

0

Inherited from

HorzScaleOptions.rightOffset


barSpacing

barSpacing: number

The space between bars in pixels.

Default Value

6

Inherited from

HorzScaleOptions.barSpacing


minBarSpacing

minBarSpacing: number

The minimum space between bars in pixels.

Default Value

0.5

Inherited from

HorzScaleOptions.minBarSpacing


fixLeftEdge

fixLeftEdge: boolean

Prevent scrolling to the left of the first bar.

Default Value

false

Inherited from

HorzScaleOptions.fixLeftEdge


fixRightEdge

fixRightEdge: boolean

Prevent scrolling to the right of the most recent bar.

Default Value

false

Inherited from

HorzScaleOptions.fixRightEdge


lockVisibleTimeRangeOnResize

lockVisibleTimeRangeOnResize: boolean

Prevent changing the visible time range during chart resizing.

Default Value

false

Inherited from

HorzScaleOptions.lockVisibleTimeRangeOnResize


rightBarStaysOnScroll

rightBarStaysOnScroll: boolean

Prevent the hovered bar from moving when scrolling.

Default Value

false

Inherited from

HorzScaleOptions.rightBarStaysOnScroll


borderVisible

borderVisible: boolean

Show the time scale border.

Default Value

true

Inherited from

HorzScaleOptions.borderVisible


borderColor

borderColor: string

The time scale border color.

Default Value

'#2B2B43'

Inherited from

HorzScaleOptions.borderColor


visible

visible: boolean

Show the time scale.

Default Value

true

Inherited from

HorzScaleOptions.visible


timeVisible

timeVisible: boolean

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

Default Value

false

Inherited from

HorzScaleOptions.timeVisible


secondsVisible

secondsVisible: boolean

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

Default Value

true

Inherited from

HorzScaleOptions.secondsVisible


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

Inherited from

HorzScaleOptions.shiftVisibleRangeOnNewBar


allowShiftVisibleRangeOnWhitespaceReplacement

allowShiftVisibleRangeOnWhitespaceReplacement: boolean

Allow the visible range to be shifted to the right when a new bar is added which is replacing an existing whitespace time point on the chart.

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

Default Value

false

Inherited from

HorzScaleOptions.allowShiftVisibleRangeOnWhitespaceReplacement


ticksVisible

ticksVisible: boolean

Draw small vertical line on time axis labels.

Default Value

false

Inherited from

HorzScaleOptions.ticksVisible


tickMarkMaxCharacterLength

Optional tickMarkMaxCharacterLength: number

Maximum tick mark label length. Used to override the default 8 character maximum length.

Default Value

undefined

Inherited from

HorzScaleOptions.tickMarkMaxCharacterLength


uniformDistribution

uniformDistribution: boolean

Changes horizontal scale marks generation. With this flag equal to true, marks of the same weight are either all drawn or none are drawn at all.

Inherited from

HorzScaleOptions.uniformDistribution


minimumHeight

minimumHeight: number

Define a minimum height for the time scale. Note: This value will be exceeded if the time scale needs more space to display it's contents.

Setting a minimum height could be useful for ensuring that multiple charts positioned in a horizontal stack each have an identical time scale height, or for plugins which require a bit more space within the time scale pane.

Default Value

0

Inherited from

HorzScaleOptions.minimumHeight


allowBoldLabels

allowBoldLabels: boolean

Allow major time scale labels to be rendered in a bolder font weight.

Default Value

true

Inherited from

HorzScaleOptions.allowBoldLabels


tickMarkFormatter

Optional tickMarkFormatter: TickMarkFormatter

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

Default Value

undefined