- Interface: TimeScale<O>
- Type parameters
- Hierarchy
- Properties
- Methods
- afterBuildTicks
- afterCalculateLabelRotation
- afterDataLimits
- afterFit
- afterSetDimensions
- afterTickToLabelConversion
- afterUpdate
- beforeBuildTicks
- beforeCalculateLabelRotation
- beforeDataLimits
- beforeFit
- beforeLayout
- beforeSetDimensions
- beforeTickToLabelConversion
- beforeUpdate
- buildTicks
- calculateLabelRotation
- configure
- determineDataLimits
- draw
- drawGrid
- drawLabels
- drawTitle
- fit
- generateTickLabels
- getBasePixel
- getBaseValue
- getDataTimestamps
- getDecimalForPixel
- getLabelForValue
- getLabelTimestamps
- getLabels
- getLineWidthForValue
- getMatchingVisibleMetas
- getMinMax
- getPadding
- getPixelForDecimal
- getPixelForTick
- getPixelForValue
- getProps
- Type parameters
- Parameters
- Returns
- Inherited from
- Defined in
- Type parameters
- Parameters
- Returns
- Inherited from
- Defined in
- Type parameters
- Parameters
- Returns
- Inherited from
- Defined in
- Type parameters
- Parameters
- Returns
- Inherited from
- Defined in
- Type parameters
- Parameters
- Returns
- Inherited from
- Defined in
- Parameters
- Returns
- Inherited from
- Defined in
- getTicks
- getUserBounds
- getValueForPixel
- hasValue
- init
- isFullSize
- isHorizontal
- normalize
- parse
- setDimensions
- tooltipPosition
- update
Interface: TimeScale<O>
Type parameters
Name | Type |
---|---|
O | extends TimeScaleOptions TimeScaleOptions |
Hierarchy
Scale
<O
>↳
TimeScale
Properties
active
• Readonly
active: boolean
Inherited from
Defined in
element.d.ts:6 (opens new window)
axis
• axis: string
Inherited from
Defined in
index.esm.d.ts:1173 (opens new window)
bottom
• bottom: number
Bottom edge of the item. Set by layout system and cannot be used in update
Inherited from
Defined in
layout.d.ts:41 (opens new window)
chart
• Readonly
chart: Chart
<"bar"
| "line"
| "scatter"
| "bubble"
| "pie"
| "doughnut"
| "polarArea"
| "radar"
, (number
| ScatterDataPoint
| BubbleDataPoint
)[], unknown
>
Inherited from
Defined in
index.esm.d.ts:1163 (opens new window)
ctx
• Readonly
ctx: CanvasRenderingContext2D
Inherited from
Defined in
index.esm.d.ts:1162 (opens new window)
fullSize
• fullSize: boolean
if true, and the item is horizontal, then push vertical boxes down
Inherited from
Defined in
layout.d.ts:17 (opens new window)
height
• height: number
Height of item. Must be valid after update()
Inherited from
Defined in
layout.d.ts:25 (opens new window)
id
• Readonly
id: string
Inherited from
Defined in
index.esm.d.ts:1160 (opens new window)
labelRotation
• labelRotation: number
Inherited from
Defined in
index.esm.d.ts:1174 (opens new window)
left
• left: number
Left edge of the item. Set by layout system and cannot be used in update
Inherited from
Defined in
layout.d.ts:29 (opens new window)
max
• max: number
Inherited from
Defined in
index.esm.d.ts:1176 (opens new window)
maxHeight
• maxHeight: number
Inherited from
Defined in
index.esm.d.ts:1166 (opens new window)
maxWidth
• maxWidth: number
Inherited from
Defined in
index.esm.d.ts:1165 (opens new window)
min
• min: number
Inherited from
Defined in
index.esm.d.ts:1175 (opens new window)
options
• Readonly
options: O
Inherited from
Defined in
element.d.ts:7 (opens new window)
paddingBottom
• paddingBottom: number
Inherited from
Defined in
index.esm.d.ts:1169 (opens new window)
paddingLeft
• paddingLeft: number
Inherited from
Defined in
index.esm.d.ts:1170 (opens new window)
paddingRight
• paddingRight: number
Inherited from
Defined in
index.esm.d.ts:1171 (opens new window)
paddingTop
• paddingTop: number
Inherited from
Defined in
index.esm.d.ts:1168 (opens new window)
position
• position: LayoutPosition
The position of the item in the chart layout. Possible values are
Inherited from
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
Defined in
layout.d.ts:37 (opens new window)
ticks
• ticks: Tick
[]
Inherited from
Defined in
index.esm.d.ts:1177 (opens new window)
top
• top: number
Top edge of the item. Set by layout system and cannot be used in update
Inherited from
Defined in
layout.d.ts:33 (opens new window)
type
• Readonly
type: string
Inherited from
Defined in
index.esm.d.ts:1161 (opens new window)
weight
• weight: number
The weight used to sort the item. Higher weights are further away from the chart area
Inherited from
Defined in
layout.d.ts:13 (opens new window)
width
• width: number
Width of item. Must be valid after update()
Inherited from
Defined in
layout.d.ts:21 (opens new window)
x
• Readonly
x: number
Inherited from
Defined in
element.d.ts:4 (opens new window)
y
• Readonly
y: number
Inherited from
Defined in
element.d.ts:5 (opens new window)
Methods
afterBuildTicks
▸ afterBuildTicks(): void
Returns
void
Inherited from
Defined in
index.esm.d.ts:1257 (opens new window)
afterCalculateLabelRotation
▸ afterCalculateLabelRotation(): void
Returns
void
Inherited from
Scale.afterCalculateLabelRotation
Defined in
index.esm.d.ts:1263 (opens new window)
afterDataLimits
▸ afterDataLimits(): void
Returns
void
Inherited from
Defined in
index.esm.d.ts:1254 (opens new window)
afterFit
▸ afterFit(): void
Returns
void
Inherited from
Defined in
index.esm.d.ts:1266 (opens new window)
afterSetDimensions
▸ afterSetDimensions(): void
Returns
void
Inherited from
Defined in
index.esm.d.ts:1251 (opens new window)
afterTickToLabelConversion
▸ afterTickToLabelConversion(): void
Returns
void
Inherited from
Scale.afterTickToLabelConversion
Defined in
index.esm.d.ts:1260 (opens new window)
afterUpdate
▸ afterUpdate(): void
Returns
void
Inherited from
Defined in
index.esm.d.ts:1248 (opens new window)
beforeBuildTicks
▸ beforeBuildTicks(): void
Returns
void
Inherited from
Defined in
index.esm.d.ts:1255 (opens new window)
beforeCalculateLabelRotation
▸ beforeCalculateLabelRotation(): void
Returns
void
Inherited from
Scale.beforeCalculateLabelRotation
Defined in
index.esm.d.ts:1261 (opens new window)
beforeDataLimits
▸ beforeDataLimits(): void
Returns
void
Inherited from
Defined in
index.esm.d.ts:1252 (opens new window)
beforeFit
▸ beforeFit(): void
Returns
void
Inherited from
Defined in
index.esm.d.ts:1264 (opens new window)
beforeLayout
▸ Optional
beforeLayout(): void
Called before the layout process starts
Returns
void
Inherited from
Defined in
layout.d.ts:46 (opens new window)
beforeSetDimensions
▸ beforeSetDimensions(): void
Returns
void
Inherited from
Defined in
index.esm.d.ts:1249 (opens new window)
beforeTickToLabelConversion
▸ beforeTickToLabelConversion(): void
Returns
void
Inherited from
Scale.beforeTickToLabelConversion
Defined in
index.esm.d.ts:1258 (opens new window)
beforeUpdate
▸ beforeUpdate(): void
Returns
void
Inherited from
Defined in
index.esm.d.ts:1246 (opens new window)
buildTicks
▸ buildTicks(): Tick
[]
Returns
Tick
[]
Inherited from
Defined in
index.esm.d.ts:1256 (opens new window)
calculateLabelRotation
▸ calculateLabelRotation(): void
Returns
void
Inherited from
Defined in
index.esm.d.ts:1262 (opens new window)
configure
▸ configure(): void
Returns
void
Inherited from
Defined in
index.esm.d.ts:1247 (opens new window)
determineDataLimits
▸ determineDataLimits(): void
Returns
void
Inherited from
Defined in
index.esm.d.ts:1253 (opens new window)
draw
▸ draw(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
): void
Parameters
Name | Type |
---|---|
chartArea | ChartArea |
Returns
void
Inherited from
Defined in
index.esm.d.ts:1182 (opens new window)
drawLabels
▸ drawLabels(chartArea
): void
Parameters
Name | Type |
---|---|
chartArea | ChartArea |
Returns
void
Inherited from
Defined in
index.esm.d.ts:1181 (opens new window)
drawTitle
▸ drawTitle(chartArea
): void
Parameters
Name | Type |
---|---|
chartArea | ChartArea |
Returns
void
Inherited from
Defined in
index.esm.d.ts:1180 (opens new window)
fit
▸ fit(): void
Returns
void
Inherited from
Defined in
index.esm.d.ts:1265 (opens new window)
generateTickLabels
▸ generateTickLabels(ticks
): void
Parameters
Name | Type |
---|---|
ticks | Tick [] |
Returns
void
Inherited from
Defined in
index.esm.d.ts:1259 (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
Defined in
index.esm.d.ts:1238 (opens new window)
getBaseValue
▸ getBaseValue(): number
Returns
number
Inherited from
Defined in
index.esm.d.ts:1232 (opens new window)
getDataTimestamps
▸ getDataTimestamps(): number
[]
Returns
number
[]
Defined in
index.esm.d.ts:3085 (opens new window)
getDecimalForPixel
▸ getDecimalForPixel(pixel
): number
Parameters
Name | Type |
---|---|
pixel | number |
Returns
number
Inherited from
Defined in
index.esm.d.ts:1188 (opens new window)
getLabelForValue
▸ getLabelForValue(value
): 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:1208 (opens new window)
getLabelTimestamps
▸ getLabelTimestamps(): string
[]
Returns
string
[]
Defined in
index.esm.d.ts:3086 (opens new window)
getLabels
▸ getLabels(): string
[]
Returns
string
[]
Inherited from
Defined in
index.esm.d.ts:1245 (opens new window)
getLineWidthForValue
▸ getLineWidthForValue(value
): number
Returns the grid line width at given value
Parameters
Name | Type |
---|---|
value | number |
Returns
number
Inherited from
Defined in
index.esm.d.ts:1213 (opens new window)
getMatchingVisibleMetas
▸ getMatchingVisibleMetas(type?
): ChartMeta
<Element
<Object
, Object
>, Element
<Object
, Object
>>[]
Parameters
Name | Type |
---|---|
type? | string |
Returns
ChartMeta
<Element
<Object
, Object
>, Element
<Object
, Object
>>[]
Inherited from
Defined in
index.esm.d.ts:1178 (opens new window)
getMinMax
▸ getMinMax(canStack
): Object
Parameters
Name | Type |
---|---|
canStack | boolean |
Returns
Object
Name | Type |
---|---|
max | number |
min | number |
Inherited from
Defined in
index.esm.d.ts:1243 (opens new window)
getPadding
▸ Optional
getPadding(): ChartArea
Returns an object with padding on the edges
Returns
Inherited from
Defined in
layout.d.ts:54 (opens new window)
getPixelForDecimal
▸ getPixelForDecimal(decimal
): 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 |
---|---|
decimal | number |
Returns
number
Inherited from
Defined in
index.esm.d.ts:1195 (opens new window)
getPixelForTick
▸ getPixelForTick(index
): 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
Defined in
index.esm.d.ts:1202 (opens new window)
getPixelForValue
▸ getPixelForValue(value
, index?
): 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
Defined in
index.esm.d.ts:1222 (opens new window)
getProps
▸ getProps<P
>(props
, final?
): Pick
<Object
, P
>
Type parameters
Name | Type |
---|---|
P | extends never |
Parameters
Name | Type |
---|---|
props | [P ] |
final? | boolean |
Returns
Pick
<Object
, P
>
Inherited from
Defined in
element.d.ts:11 (opens new window)
▸ getProps<P
, P2
>(props
, final?
): Pick
<Object
, P
| P2
>
Type parameters
Name | Type |
---|---|
P | extends never |
P2 | extends never |
Parameters
Name | Type |
---|---|
props | [P , P2 ] |
final? | boolean |
Returns
Pick
<Object
, P
| P2
>
Inherited from
Defined in
element.d.ts:12 (opens new window)
▸ getProps<P
, P2
, P3
>(props
, final?
): Pick
<Object
, P
| P2
| P3
>
Type parameters
Name | Type |
---|---|
P | extends never |
P2 | extends never |
P3 | extends never |
Parameters
Name | Type |
---|---|
props | [P , P2 , P3 ] |
final? | boolean |
Returns
Pick
<Object
, P
| P2
| P3
>
Inherited from
Defined in
element.d.ts:13 (opens new window)
▸ getProps<P
, P2
, P3
, P4
>(props
, final?
): Pick
<Object
, P
| P2
| P3
| P4
>
Type parameters
Name | Type |
---|---|
P | extends never |
P2 | extends never |
P3 | extends never |
P4 | extends never |
Parameters
Name | Type |
---|---|
props | [P , P2 , P3 , P4 ] |
final? | boolean |
Returns
Pick
<Object
, P
| P2
| P3
| P4
>
Inherited from
Defined in
element.d.ts:17 (opens new window)
▸ getProps<P
, P2
, P3
, P4
, P5
>(props
, final?
): Pick
<Object
, P
| P2
| P3
| P4
| P5
>
Type parameters
Name | Type |
---|---|
P | extends never |
P2 | extends never |
P3 | extends never |
P4 | extends never |
P5 | extends never |
Parameters
Name | Type |
---|---|
props | [P , P2 , P3 , P4 , P5 ] |
final? | boolean |
Returns
Pick
<Object
, P
| P2
| P3
| P4
| P5
>
Inherited from
Defined in
element.d.ts:21 (opens new window)
▸ getProps(props
, final?
): Object
Parameters
Name | Type |
---|---|
props | never [] |
final? | boolean |
Returns
Object
Inherited from
Defined in
element.d.ts:25 (opens new window)
getTicks
▸ getTicks(): Tick
[]
Returns
Tick
[]
Inherited from
Defined in
index.esm.d.ts:1244 (opens new window)
getUserBounds
▸ getUserBounds(): Object
Returns
Object
Name | Type |
---|---|
max | number |
maxDefined | boolean |
min | number |
minDefined | boolean |
Inherited from
Defined in
index.esm.d.ts:1242 (opens new window)
getValueForPixel
▸ getValueForPixel(pixel
): 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
Defined in
index.esm.d.ts:1230 (opens new window)
hasValue
▸ hasValue(): boolean
Returns
boolean
Inherited from
Defined in
element.d.ts:10 (opens new window)
init
▸ init(options
): void
Parameters
Name | Type |
---|---|
options | O |
Returns
void
Inherited from
Defined in
index.esm.d.ts:1240 (opens new window)
isFullSize
▸ isFullSize(): boolean
Returns
boolean
Inherited from
Defined in
index.esm.d.ts:1268 (opens new window)
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
[]
Parameters
Name | Type |
---|---|
values | number [] |
Returns
number
[]
Defined in
index.esm.d.ts:3087 (opens new window)
parse
▸ parse(raw
, index
): unknown
Parameters
Name | Type |
---|---|
raw | unknown |
index | number |
Returns
unknown
Inherited from
Defined in
index.esm.d.ts:1241 (opens new window)
setDimensions
▸ setDimensions(): void
Returns
void
Inherited from
Defined in
index.esm.d.ts:1250 (opens new window)
tooltipPosition
▸ tooltipPosition(useFinalPosition?
): Point
Parameters
Name | Type |
---|---|
useFinalPosition? | boolean |
Returns
Inherited from
Defined in
element.d.ts:9 (opens new window)
update
▸ update(width
, height
, margins?
): void
Takes two parameters: width and height.
Parameters
Name | Type |
---|---|
width | number |
height | number |
margins? | ChartArea |
Returns
void