Skip to main content
Version: Next

Interface: IHorzScaleBehavior<HorzScaleItem>

Class interface for Horizontal scale behavior

Type parameters

Name
HorzScaleItem

Methods

options

options(): ChartOptionsImpl<HorzScaleItem>

Structure describing options of the chart.

Returns

ChartOptionsImpl<HorzScaleItem>

ChartOptionsBase


setOptions

setOptions(options): void

Set the chart options. Note that this is different to applyOptions since the provided options will overwrite the current options instead of merging with the current options.

Parameters

NameTypeDescription
optionsChartOptionsImpl<HorzScaleItem>Chart options to be set

Returns

void

void


preprocessData

preprocessData(data): void

Method to preprocess the data.

Parameters

NameTypeDescription
dataDataItem<HorzScaleItem> | DataItem<HorzScaleItem>[]Data items for the series

Returns

void

void


convertHorzItemToInternal

convertHorzItemToInternal(item): Object

Convert horizontal scale item into an internal horizontal scale item.

Parameters

NameTypeDescription
itemHorzScaleItemitem to be converted

Returns

Object

InternalHorzScaleItem

NameTypeDescription
[species]"InternalHorzScaleItem"The 'name' or species of the nominal.

createConverterToInternalObj

createConverterToInternalObj(data): HorzScaleItemConverterToInternalObj<HorzScaleItem>

Creates and returns a converter for changing series data into internal horizontal scale items.

Parameters

NameTypeDescription
data(AreaData<HorzScaleItem> | WhitespaceData<HorzScaleItem> | BarData<HorzScaleItem> | CandlestickData<HorzScaleItem> | BaselineData<HorzScaleItem> | LineData<HorzScaleItem> | HistogramData<HorzScaleItem> | CustomData<HorzScaleItem> | CustomSeriesWhitespaceData<HorzScaleItem>)[]series data

Returns

HorzScaleItemConverterToInternalObj<HorzScaleItem>

HorzScaleItemConverterToInternalObj


key

key(internalItem): InternalHorzScaleItemKey

Returns the key for the specified horizontal scale item.

Parameters

NameTypeDescription
internalItemHorzScaleItem | { [species]: "InternalHorzScaleItem" }horizontal scale item for which the key should be returned

Returns

InternalHorzScaleItemKey

InternalHorzScaleItemKey


cacheKey

cacheKey(internalItem): number

Returns the cache key for the specified horizontal scale item.

Parameters

NameTypeDescription
internalItemObjecthorizontal scale item for which the cache key should be returned
internalItem.[species]"InternalHorzScaleItem"The 'name' or species of the nominal.

Returns

number

number


updateFormatter

updateFormatter(options): void

Update the formatter with the localization options.

Parameters

NameTypeDescription
optionsLocalizationOptions<HorzScaleItem>Localization options

Returns

void

void


formatHorzItem

formatHorzItem(item): string

Format the horizontal scale item into a display string.

Parameters

NameTypeDescription
itemObjecthorizontal scale item to be formatted as a string
item.[species]"InternalHorzScaleItem"The 'name' or species of the nominal.

Returns

string

string


formatTickmark

formatTickmark(item, localizationOptions): string

Format the horizontal scale tickmark into a display string.

Parameters

NameTypeDescription
itemTickMarktickmark item
localizationOptionsLocalizationOptions<HorzScaleItem>Localization options

Returns

string

string


maxTickMarkWeight

maxTickMarkWeight(marks): TickMarkWeightValue

Returns the maximum tickmark weight value for the specified tickmarks on the time scale.

Parameters

NameTypeDescription
marksTimeMark[]Timescale tick marks

Returns

TickMarkWeightValue

TickMarkWeightValue


fillWeightsForPoints

fillWeightsForPoints(sortedTimePoints, startIndex): void

Fill the weights for the sorted time scale points.

Parameters

NameTypeDescription
sortedTimePointsreadonly Mutable<TimeScalePoint>[]sorted time scale points
startIndexnumberstarting index

Returns

void

void


shouldResetTickmarkLabels

Optional shouldResetTickmarkLabels(tickMarks): boolean

If returns true, then the tick mark formatter will be called for all the visible tick marks even if the formatter has previously been called for a specific tick mark. This allows you to change the formatting on all the tick marks.

Parameters

NameTypeDescription
tickMarksreadonly TickMark[]array of tick marks

Returns

boolean

boolean