Skip to content

Commit 67c0ebd

Browse files
committed
update doc
1 parent c5c48eb commit 67c0ebd

File tree

5 files changed

+7
-5
lines changed

5 files changed

+7
-5
lines changed

Diff for: docs/guide/configuration.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ The following options apply to all annotations unless they are overwritten on a
6363

6464
| Name | Type | [Scriptable](options.md#scriptable-options) | Default | Notes
6565
| ---- | ---- | :----: | ---- | ----
66-
| `drawTime` | `string` | Yes | `'afterDatasetsDraw'` | See [drawTime](options#draw-time).
66+
| `drawTime` | `string`\|`number` | Yes | `'afterDatasetsDraw'` | See [drawTime](options#draw-time).
6767
| `init` | `boolean` | [See initial animation](#initial-animation) | `false` | Enable the animation to the annotations when they are drawing at chart initialization
6868

6969
### Initial animation

Diff for: docs/guide/options.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ module.exports = {
8383

8484
## Draw Time
8585

86-
The `drawTime` option for an annotation determines where in the chart lifecycle the drawing occurs. Four potential options are available:
86+
The `drawTime` option for an annotation determines where in the chart lifecycle the drawing occurs. Four potential predefined options are available:
8787

8888
| Option | Notes
8989
| ---- | ----
@@ -92,6 +92,8 @@ The `drawTime` option for an annotation determines where in the chart lifecycle
9292
| `'afterDatasetsDraw'` | Occurs after drawing of datasets but before items such as the tooltip
9393
| `'afterDraw'` | After other drawing is completed.
9494

95+
Furthermore, the `drawTime` option can be set as number which represents the dataset index used to draw the annotation, before that dataset will be.
96+
9597
## Option Context
9698

9799
The option context is used to give contextual information when resolving options and only applies to scriptable options. The object is preserved, so it can be used to store and pass information between calls / options.

Diff for: docs/guide/types/_commonInnerLabel.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ All of these options can be [Scriptable](../options.md#scriptable-options)
99
| [`color`](#fonts-and-colors) | [`Color`\|`Color[]`](../options#color) | `'black'` | Text color.
1010
| `content` | `string`\|`string[]`\|[`Image`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/Image)\|[`HTMLCanvasElement`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement) | `null` | The content to show in the label.
1111
| `display` | `boolean` | `false` | Whether or not the label is shown.
12-
| `drawTime` | `string` | `options.drawTime` | See [drawTime](../options#draw-time). Defaults to the annotation draw time if unset
12+
| `drawTime` | `string`\|`number` | `options.drawTime` | See [drawTime](../options#draw-time). Defaults to the annotation draw time if unset
1313
| [`font`](#fonts-and-colors) | [`Font`\|`Font[]`](../options#font) | `{ weight: 'bold' }` | Label font
1414
| `height` | `number`\|`string` | `undefined` | Overrides the height of the image or canvas element. Could be set in pixel by a number, or in percentage of current height of image or canvas element by a string. If undefined, uses the height of the image or canvas element. It is used only when the content is an image or canvas element.
1515
| `opacity` | `number` | `undefined` | Overrides the opacity of the image or canvas element. Could be set a number in the range 0.0 to 1.0, inclusive. If undefined, uses the opacity of the image or canvas element. It is used only when the content is an image or canvas element.

Diff for: docs/guide/types/_commonOptions.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ The following options are available for all annotations.
1111
| [`borderDashOffset`](#styling) | `number` | Yes | `0`
1212
| [`borderShadowColor`](#styling) | [`Color`](../options.md#color) | Yes | `'transparent'`
1313
| [`display`](#general) | `boolean` | Yes | `true`
14-
| [`drawTime`](#general) | `string` | Yes | `'afterDatasetsDraw'`
14+
| [`drawTime`](#general) | `string`\|`number` | Yes | `'afterDatasetsDraw'`
1515
| [`init`](../configuration.html#common) | `boolean` | [See initial animation](../configuration.html#initial-animation) | `undefined`
1616
| [`id`](#general) | `string` | No | `undefined`
1717
| [`shadowBlur`](#styling) | `number` | Yes | `0`

Diff for: docs/guide/types/line.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ All of these options can be [Scriptable](../options.md#scriptable-options)
134134
| [`color`](#fonts-and-colors) | [`Color`\|`Color[]`](../options#color) | `'#fff'` | Text color.
135135
| `content` | `string`\|`string[]`\|[`Image`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/Image)\|[`HTMLCanvasElement`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement) | `null` | The content to show in the label.
136136
| `display` | `boolean` | `false` | Whether or not the label is shown.
137-
| `drawTime` | `string` | `options.drawTime` | See [drawTime](../options#draw-time). Defaults to the line annotation draw time if unset.
137+
| `drawTime` | `string`\|`number` | `options.drawTime` | See [drawTime](../options#draw-time). Defaults to the line annotation draw time if unset.
138138
| [`font`](#fonts-and-colors) | [`Font`\|`Font[]`](../options#font) | `{ weight: 'bold' }` | Label font.
139139
| `height` | `number`\|`string` | `undefined` | Overrides the height of the image or canvas element. Could be set in pixel by a number, or in percentage of current height of image or canvas element by a string. If undefined, uses the height of the image or canvas element. It is used only when the content is an image or canvas element.
140140
| `opacity` | `number` | `undefined` | Overrides the opacity of the image or canvas element. Could be set a number in the range 0.0 to 1.0, inclusive. If undefined, uses the opacity of the image or canvas element. It is used only when the content is an image or canvas element.

0 commit comments

Comments
 (0)