You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guide/migrationV2.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -102,7 +102,7 @@ The following diagram is showing the element properties about a `'polygon'` anno
102
102
103
103
## Events
104
104
105
-
`chartjs-plugin-annotation` plugin version 2 introduces the [`interaction`](options#interaction) options, to configure which events trigger annotation interactions. By default, the plugin uses the [chart interaction configuration](https://www.chartjs.org/docs/latest/configuration/interactions.html#interactions).
105
+
`chartjs-plugin-annotation` plugin version 2 introduces the [`interaction`](options.md#interaction) options, to configure which events trigger annotation interactions. By default, the plugin uses the [chart interaction configuration](https://www.chartjs.org/docs/latest/configuration/interactions.html#interactions).
106
106
107
107
* When [scatter charts](https://www.chartjs.org/docs/latest/charts/scatter.html) are used, the interaction default `mode` in Chart.js is `point`, while, in the previous plugin version, the default was `nearest`.
Copy file name to clipboardExpand all lines: docs/guide/types/_commonInnerLabel.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,21 +2,21 @@
2
2
3
3
Namespace: `options.annotations[annotationID].label`, it defines options for the the label of annotation.
4
4
5
-
All of these options can be [Scriptable](../options#scriptable-options)
5
+
All of these options can be [Scriptable](../options.md#scriptable-options)
6
6
7
7
| Name | Type | Default | Notes
8
8
| ---- | ---- | :----: | ----
9
-
| `color` | [`Color`](../options#color) | `'black'` | Text color.
9
+
| `color` | [`Color`](../options.md#color) | `'black'` | Text color.
10
10
| `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.
11
11
| `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
| `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.
15
-
| `padding` | [`Padding`](../options#padding) | `6` | The padding to add around the text label.
15
+
| `padding` | [`Padding`](../options.md#padding) | `6` | The padding to add around the text label.
16
16
| [`position`](#position) | `string`\|`{x: string, y: string}` | `'center'` | Anchor position of label in the annotation.
17
17
| `rotation` | `number` | `undefined` | Rotation of label, in degrees. If `undefined`, the annotation rotation is used.
18
18
| `textAlign` | `string` | `'start'` | Text alignment of label content when there's more than one line. Possible options are: `'left'`, `'start'`, `'center'`, `'end'`, `'right'`.
19
-
| `textStrokeColor` | [`Color`](../options#color) | `undefined` | The color of the stroke around the text.
19
+
| `textStrokeColor` | [`Color`](../options.md#color) | `undefined` | The color of the stroke around the text.
20
20
| `textStrokeWidth` | `number` | `0` | Stroke width around the text.
21
21
| `width` | `number`\|`string` | `undefined` | Overrides the width of the image or canvas element. Could be set in pixel by a number, or in percentage of current width of image or canvas element by a string. If undefined, uses the width of the image or canvas element. It is used only when the content is an image or canvas element.
22
22
| `xAdjust` | `number` | `0` | Adjustment along x-axis (left-right) of label relative to computed position. Negative values move the label left, positive right.
@@ -71,7 +70,7 @@ If one of the axes does not match an axis in the chart, the box will take the en
71
70
| ---- | ----
72
71
| `adjustScaleRange` | Should the scale range be adjusted if this annotation is out of range.
73
72
| `display` | Whether or not this annotation is visible.
74
-
| `drawTime` | See [drawTime](../options#draw-time).
73
+
| `drawTime` | See [drawTime](../options.md#draw-time).
75
74
| `id` | Identifies a unique id for the annotation and it will be stored in the element context. When the annotations are defined by an object, the id is automatically set using the key used to store the annotations in the object. When the annotations are configured by an array, the id, passed by this option in the annotation, will be used.
76
75
| `rotation` | Rotation of the box in degrees.
77
76
| `xMax` | Right edge of the box in units along the x axis.
@@ -112,4 +111,4 @@ The following diagram is showing the element properties about a `'box'` annotati
112
111
113
112

114
113
115
-
The label of a box annotation is described as a [label annotation](./label#element) and accessible by `element.label`.
114
+
The label of a box annotation is described as a [label annotation](./label.md#element) and accessible by `element.label`.
@@ -68,7 +67,7 @@ If one of the axes does not match an axis in the chart, the ellipse will take th
68
67
| ---- | ----
69
68
| `adjustScaleRange` | Should the scale range be adjusted if this annotation is out of range.
70
69
| `display` | Whether or not this annotation is visible.
71
-
| `drawTime` | See [drawTime](../options#draw-time).
70
+
| `drawTime` | See [drawTime](../options.md#draw-time).
72
71
| `id` | Identifies a unique id for the annotation and it will be stored in the element context. When the annotations are defined by an object, the id is automatically set using the key used to store the annotations in the object. When the annotations are configured by an array, the id, passed by this option in the annotation, will be used.
73
72
| `rotation` | Rotation of the ellipse in degrees, default is 0.
74
73
| `xMax` | Right edge of the ellipse in units along the x axis.
@@ -90,7 +89,7 @@ The 4 coordinates, xMin, xMax, yMin, yMax are optional. If not specified, the bo
90
89
| `adjustScaleRange` | Should the scale range be adjusted if this annotation is out of range.
91
90
| `content` | The content to show in the text annotation.
92
91
| `display` | Whether or not this annotation is visible.
93
-
| `drawTime` | See [drawTime](../options#draw-time).
92
+
| `drawTime` | See [drawTime](../options.md#draw-time).
94
93
| `height` | 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.
95
94
| `id` | Identifies a unique id for the annotation and it will be stored in the element context. When the annotations are defined by an object, the id is automatically set using the key used to store the annotations in the object. When the annotations are configured by an array, the id, passed by this option in the annotation, will be used.
96
95
| `padding` | The padding to add around the text label.
@@ -155,7 +154,6 @@ Namespace: `options.annotations[annotationID].callout`, it defines options for t
155
154
/* <block:options:0> */
156
155
constoptions= {
157
156
plugins: {
158
-
autocolors:false,
159
157
annotation: {
160
158
annotations: {
161
159
label1: {
@@ -203,12 +201,12 @@ module.exports = {
203
201
};
204
202
```
205
203
206
-
All of these options can be [Scriptable](../options#scriptable-options).
204
+
All of these options can be [Scriptable](../options.md#scriptable-options).
207
205
208
206
| Name | Type | Default | Notes
209
207
| ---- | ---- | :----: | ----
210
208
| `borderCapStyle` | `string` | `'butt'` | Cap style of the border line of callout. See [MDN](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/lineCap).
211
-
| `borderColor` | [`Color`](../options#color) | `undefined` | Stroke color of the pointer of the callout.
209
+
| `borderColor` | [`Color`](../options.md#color) | `undefined` | Stroke color of the pointer of the callout.
212
210
| `borderDash` | `number[]` | `[]` | Length and spacing of dashes of callout. See [MDN](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/setLineDash).
213
211
| `borderDashOffset` | `number` | `0` | Offset for line dashes of callout. See [MDN](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/lineDashOffset).
214
212
| `borderJoinStyle` | `string` | `'miter'` | Border line join style of the callout. See [MDN](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/lineJoin).
0 commit comments