Skip to main content
Version: 4.2

Interface: HorzScaleOptions

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

Hierarchy

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


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


ticksVisible

ticksVisible: boolean

Draw small vertical line on time axis labels.

Default Value

false


tickMarkMaxCharacterLength

Optional tickMarkMaxCharacterLength: number

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

Default Value

undefined


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.


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


allowBoldLabels

allowBoldLabels: boolean

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

Default Value

true