Interface: TimeScale<O>
-
↳ TimeScale
• Readonly
active: boolean
Inherited from: Scale.
Defined in: element.d.ts:6 (opens new window)
axis
• axis: string
Inherited from: Scale.
Defined in: index.esm.d.ts:1154 (opens new window)
bottom
• bottom: number
Bottom edge of the item. Set by layout system and cannot be used in update
Inherited from: Scale.
Defined in: layout.d.ts:41 (opens new window)
chart
• Readonly
chart: Chart<bar | line | scatter | bubble | pie | doughnut | polarArea | radar, (number | | BubbleDataPoint)[], unknown>
Inherited from: .chart
Defined in:
ctx
• Readonly
ctx: CanvasRenderingContext2D
Inherited from: .ctx
Defined in:
fullSize
• fullSize: boolean
if true, and the item is horizontal, then push vertical boxes down
Inherited from: .fullSize
Defined in:
height
• height: number
Height of item. Must be valid after update()
Inherited from: .height
Defined in:
id
• Readonly
id: string
Inherited from: .id
Defined in:
labelRotation
• labelRotation: number
Inherited from: .labelRotation
Defined in:
left
• left: number
Left edge of the item. Set by layout system and cannot be used in update
Inherited from: .left
Defined in:
max
• max: number
Inherited from: .max
Defined in:
maxHeight
• maxHeight: number
Inherited from: .maxHeight
Defined in:
maxWidth
• maxWidth: number
Inherited from: .maxWidth
Defined in:
min
• min: number
Inherited from: .min
Defined in:
options
• Readonly
options: O
Inherited from: .options
Defined in:
paddingBottom
• paddingBottom: number
Inherited from: .paddingBottom
Defined in:
paddingLeft
• paddingLeft: number
Inherited from: .paddingLeft
Defined in:
paddingRight
• paddingRight: number
Inherited from: .paddingRight
Defined in:
paddingTop
• paddingTop: number
Inherited from: .paddingTop
Defined in:
position
• position:
The position of the item in the chart layout. Possible values are
Inherited from: Scale.
Defined in: layout.d.ts:9 (opens new window)
right
• right: number
Right edge of the item. Set by layout system and cannot be used in update
Inherited from: Scale.
Defined in: layout.d.ts:37 (opens new window)
ticks
• ticks: Tick[]
Inherited from: .ticks
Defined in:
top
• top: number
Top edge of the item. Set by layout system and cannot be used in update
Inherited from: .top
Defined in:
type
• Readonly
type: string
Inherited from: .type
Defined in:
weight
• weight: number
The weight used to sort the item. Higher weights are further away from the chart area
Inherited from: .weight
Defined in:
width
• width: number
Width of item. Must be valid after update()
Inherited from: .width
Defined in:
• Readonly
x: number
Inherited from: Scale.
Defined in: element.d.ts:4 (opens new window)
y
• Readonly
y: number
Inherited from: Scale.
Defined in: element.d.ts:5 (opens new window)
afterBuildTicks
▸ afterBuildTicks(): void
Returns: void
Inherited from: Scale
Defined in:
afterCalculateLabelRotation
▸ afterCalculateLabelRotation(): void
Returns: void
Inherited from:
Defined in: index.esm.d.ts:1244 (opens new window)
afterDataLimits
▸ afterDataLimits(): void
Returns: void
Inherited from: Scale
Defined in:
afterFit
▸ afterFit(): void
Returns: void
Inherited from:
afterSetDimensions
▸ afterSetDimensions(): void
Returns: void
Inherited from:
Defined in: index.esm.d.ts:1232 (opens new window)
afterTickToLabelConversion
▸ afterTickToLabelConversion(): void
Returns: void
Inherited from: Scale
Defined in:
afterUpdate
▸ afterUpdate(): void
Returns: void
Inherited from:
Defined in: index.esm.d.ts:1229 (opens new window)
beforeBuildTicks
▸ beforeBuildTicks(): void
Returns: void
Inherited from: Scale
Defined in:
beforeCalculateLabelRotation
▸ beforeCalculateLabelRotation(): void
Returns: void
Inherited from:
Defined in: index.esm.d.ts:1242 (opens new window)
beforeDataLimits
▸ beforeDataLimits(): void
Returns: void
Inherited from: Scale
Defined in:
beforeFit
▸ beforeFit(): void
Returns: void
Inherited from:
Defined in: index.esm.d.ts:1245 (opens new window)
beforeLayout
▸ Optional
beforeLayout(): void
Called before the layout process starts
Returns: void
Inherited from: Scale
Defined in:
beforeSetDimensions
▸ beforeSetDimensions(): void
Returns: void
Inherited from:
Defined in: index.esm.d.ts:1230 (opens new window)
beforeTickToLabelConversion
▸ beforeTickToLabelConversion(): void
Returns: void
Inherited from: Scale
Defined in:
beforeUpdate
▸ beforeUpdate(): void
Returns: void
Inherited from:
Defined in: index.esm.d.ts:1227 (opens new window)
buildTicks
▸ buildTicks(): Tick[]
Returns: []
Inherited from: Scale
Defined in:
calculateLabelRotation
▸ calculateLabelRotation(): void
Returns: void
Inherited from:
Defined in: index.esm.d.ts:1243 (opens new window)
configure
▸ configure(): void
Returns: void
Inherited from: Scale
Defined in:
determineDataLimits
▸ determineDataLimits(): void
Returns: void
Inherited from:
Defined in: index.esm.d.ts:1234 (opens new window)
draw
▸ draw(chartArea
: ChartArea): void
Draws the element
Parameters:
Name | Type |
---|---|
chartArea | ChartArea |
Returns: void
Inherited from:
Defined in: layout.d.ts:50 (opens new window)
drawGrid
▸ drawGrid(chartArea
: ChartArea): void
Parameters:
Name | Type |
---|---|
chartArea | ChartArea |
Returns: void
Inherited from:
Defined in: index.esm.d.ts:1163 (opens new window)
drawLabels
▸ drawLabels(chartArea
: ChartArea): void
Parameters:
Name | Type |
---|---|
chartArea | ChartArea |
Returns: void
Inherited from:
Defined in: index.esm.d.ts:1162 (opens new window)
drawTitle
▸ drawTitle(chartArea
: ChartArea): void
Parameters:
Name | Type |
---|---|
chartArea | ChartArea |
Returns: void
Inherited from:
Defined in: index.esm.d.ts:1161 (opens new window)
fit
▸ fit(): void
Returns: void
Inherited from: Scale
Defined in:
▸ generateTickLabels(ticks
: Tick[]): void
Parameters:
Name | Type |
---|---|
ticks | Tick[] |
Returns: void
Inherited from:
Defined in: index.esm.d.ts:1240 (opens new window)
getBasePixel
▸ getBasePixel(): number
Returns the pixel for the minimum chart value The coordinate (0, 0) is at the upper-left corner of the canvas
Returns: number
Inherited from: Scale
Defined in:
getBaseValue
▸ getBaseValue(): number
Returns: number
Inherited from:
Defined in: index.esm.d.ts:1213 (opens new window)
getDataTimestamps
▸ getDataTimestamps(): number[]
Returns: number[]
Defined in: index.esm.d.ts:2940 (opens new window)
getDecimalForPixel
▸ getDecimalForPixel(pixel
: number): number
Parameters:
Name | Type |
---|---|
pixel | number |
Returns: number
Inherited from:
Defined in: index.esm.d.ts:1169 (opens new window)
getLabelForValue
▸ getLabelForValue(value
: number): string
Used to get the label to display in the tooltip for the given value
Parameters:
Name | Type |
---|---|
value | number |
Returns: string
Inherited from:
Defined in: index.esm.d.ts:1189 (opens new window)
getLabelTimestamps
▸ getLabelTimestamps(): string[]
Returns: string[]
getLabels
▸ getLabels(): string[]
Returns: string[]
Inherited from:
Defined in: index.esm.d.ts:1226 (opens new window)
getLineWidthForValue
▸ getLineWidthForValue(value
: number): number
Returns the grid line width at given value
Parameters:
Name | Type |
---|---|
value | number |
Returns: number
Inherited from:
Defined in: index.esm.d.ts:1194 (opens new window)
getMatchingVisibleMetas
▸ getMatchingVisibleMetas(type?
: string): ChartMeta<<{}, {}>, Element<{}, {}>>[]
Parameters:
Name | Type |
---|---|
type? | string |
Returns: ChartMeta<<{}, {}>, Element<{}, {}>>[]
Inherited from:
Defined in: index.esm.d.ts:1159 (opens new window)
getMinMax
▸ getMinMax(canStack
: boolean): object
Parameters:
Name | Type |
---|---|
canStack | boolean |
Returns: object
Inherited from:
Defined in: index.esm.d.ts:1224 (opens new window)
getPadding
▸ Optional
getPadding(): ChartArea
Returns an object with padding on the edges
Returns:
Inherited from: Scale
Defined in:
getPixelForDecimal
▸ getPixelForDecimal(decimal
: number): number
Utility for getting the pixel location of a percentage of scale The coordinate (0, 0) is at the upper-left corner of the canvas
Parameters:
Name | Type |
---|---|
number |
Returns: number
Inherited from: Scale
Defined in:
getPixelForTick
▸ getPixelForTick(index
: number): number
Returns the location of the tick at the given index The coordinate (0, 0) is at the upper-left corner of the canvas
Parameters:
Name | Type |
---|---|
index | number |
Returns: number
Inherited from: Scale
Defined in:
getPixelForValue
▸ getPixelForValue(value
: number, index
: number): number
Returns the location of the given data point. Value can either be an index or a numerical value The coordinate (0, 0) is at the upper-left corner of the canvas
Parameters:
Name | Type |
---|---|
value | number |
index | number |
Returns: number
Inherited from: Scale
Defined in:
getProps
▸ getProps<P>(props
: [P], final?
: boolean): Pick<{}, P>
Type parameters:
Name | Type |
---|---|
P | never |
Parameters:
Name | Type |
---|---|
props | [P] |
final? | boolean |
Returns: Pick<{}, P>
Inherited from:
Defined in: element.d.ts:11 (opens new window)
▸ getProps<P, P2>(props
: [P, P2], final?
: boolean): Pick<{}, P | P2>
Type parameters:
Name | Type |
---|---|
P | never |
P2 | never |
Parameters:
Name | Type |
---|---|
props | [P, P2] |
final? | boolean |
Returns: Pick<{}, P | P2>
Inherited from:
Defined in: element.d.ts:12 (opens new window)
▸ getProps<P, P2, P3>(props
: [P, P2, P3], final?
: boolean): Pick<{}, P | P2 | P3>
Type parameters:
Name | Type |
---|---|
P | never |
P2 | never |
P3 | never |
Parameters:
Name | Type |
---|---|
props | [P, P2, P3] |
final? | boolean |
Returns: Pick<{}, P | P2 | P3>
Inherited from:
Defined in: element.d.ts:13 (opens new window)
▸ getProps<P, P2, P3, P4>(props
: [P, P2, P3, P4], final?
: boolean): Pick<{}, P | P2 | P3 | P4>
Type parameters:
Name | Type |
---|---|
P | never |
P2 | never |
P3 | never |
P4 | never |
Parameters:
Returns: Pick<{}, P | P2 | P3 | P4>
Inherited from:
Defined in: element.d.ts:17 (opens new window)
▸ getProps<P, P2, P3, P4, P5>(props
: [P, P2, P3, P4, P5], : boolean): Pick<{}, P | P2 | P3 | P4 | P5>
Type parameters:
Name | Type |
---|---|
P | never |
P2 | never |
P3 | never |
P4 | never |
P5 | never |
Parameters:
Name | Type |
---|---|
props | [P, P2, P3, P4, P5] |
final? | boolean |
Returns: Pick<{}, P | P2 | P3 | P4 | P5>
Inherited from:
Defined in: element.d.ts:21 (opens new window)
▸ getProps(props
: never[], final?
: boolean): object
Parameters:
Name | Type |
---|---|
props | never[] |
final? | boolean |
Returns: object
Inherited from: Scale
Defined in:
getTicks
▸ getTicks(): []
Returns: Tick[]
Inherited from:
Defined in: index.esm.d.ts:1225 (opens new window)
getUserBounds
▸ getUserBounds(): object
Returns: object
Name | Type |
---|---|
max | number |
maxDefined | boolean |
min | number |
minDefined | boolean |
Inherited from: Scale
Defined in:
getValueForPixel
▸ getValueForPixel(pixel
: number): number
Used to get the data value from a given pixel. This is the inverse of getPixelForValue The coordinate (0, 0) is at the upper-left corner of the canvas
Parameters:
Name | Type |
---|---|
pixel | number |
Returns: number
Inherited from: Scale
Defined in:
hasValue
▸ hasValue(): boolean
Returns: boolean
Inherited from:
Defined in: element.d.ts:10 (opens new window)
init
▸ init(options
: O): void
Parameters:
Name | Type |
---|---|
options | O |
Returns: void
Inherited from:
Defined in: index.esm.d.ts:1221 (opens new window)
isFullSize
▸ isFullSize(): boolean
Returns: boolean
Inherited from: Scale
Defined in:
isHorizontal
▸ isHorizontal(): boolean
returns true if the layout item is horizontal (ie. top or bottom)
Returns: boolean
Inherited from:
Defined in: layout.d.ts:58 (opens new window)
normalize
▸ normalize(values
: number[]): number[]
Parameters:
Name | Type |
---|---|
values | number[] |
Returns: number[]
Defined in:
parse
▸ parse(raw
: unknown, index
: number): unknown
Parameters:
Name | Type |
---|---|
raw | unknown |
index | number |
Returns: unknown
Inherited from: Scale
Defined in:
setDimensions
▸ setDimensions(): void
Returns: void
Inherited from:
Defined in: index.esm.d.ts:1231 (opens new window)
▸ tooltipPosition(useFinalPosition?
: boolean):
Parameters:
Name | Type |
---|---|
useFinalPosition? | boolean |
Returns:
Inherited from: Scale
Defined in:
update
▸ update(width
: number, height
: number, margins?
: ): void
Takes two parameters: width and height.
Parameters:
Name | Type |
---|---|
width | number |
height | number |
margins? |
Returns: void
Defined in: layout.d.ts:64 (opens new window)