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
Name | Type | Description |
---|---|---|
options | ChartOptionsImpl <HorzScaleItem > | Chart options to be set |
Returns
void
void
preprocessData
▸ preprocessData(data
): void
Method to preprocess the data.
Parameters
Name | Type | Description |
---|---|---|
data | DataItem <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
Name | Type | Description |
---|---|---|
item | HorzScaleItem | item to be converted |
Returns
Object
InternalHorzScaleItem
Name | Type | Description |
---|---|---|
[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
Name | Type | Description |
---|---|---|
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
Name | Type | Description |
---|---|---|
internalItem | HorzScaleItem | { [species] : "InternalHorzScaleItem" } | horizontal scale item for which the key should be returned |
Returns
InternalHorzScaleItemKey
cacheKey
▸ cacheKey(internalItem
): number
Returns the cache key for the specified horizontal scale item.
Parameters
Name | Type | Description |
---|---|---|
internalItem | Object | horizontal 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
Name | Type | Description |
---|---|---|
options | LocalizationOptions <HorzScaleItem > | Localization options |
Returns
void
void
formatHorzItem
▸ formatHorzItem(item
): string
Format the horizontal scale item into a display string.
Parameters
Name | Type | Description |
---|---|---|
item | Object | horizontal 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
Name | Type | Description |
---|---|---|
item | TickMark | tickmark item |
localizationOptions | LocalizationOptions <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
Name | Type | Description |
---|---|---|
marks | TimeMark [] | Timescale tick marks |
Returns
TickMarkWeightValue
fillWeightsForPoints
▸ fillWeightsForPoints(sortedTimePoints
, startIndex
): void
Fill the weights for the sorted time scale points.
Parameters
Name | Type | Description |
---|---|---|
sortedTimePoints | readonly Mutable <TimeScalePoint >[] | sorted time scale points |
startIndex | number | starting 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
Name | Type | Description |
---|---|---|
tickMarks | readonly TickMark [] | array of tick marks |
Returns
boolean
boolean