Skip to content

Commit 20c4d28

Browse files
authored
Fix links with anchors adding md extension in the documentation (#826)
* Fix links with anchors adding md extension in the documentation * removes autocolors config from guide
1 parent 599a463 commit 20c4d28

File tree

13 files changed

+60
-71
lines changed

13 files changed

+60
-71
lines changed

docs/guide/configuration.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ title: Configuration
66

77
The following options are available at the top level. They apply to all annotations unless they are overwritten on a per-annotation basis.
88

9-
| Name | Type | [Scriptable](options#scriptable-options) | Default | Notes
9+
| Name | Type | [Scriptable](options.md#scriptable-options) | Default | Notes
1010
| ---- | ---- | :----: | ---- | ----
1111
| [`animations`](#animations) | `object` | No | [see here](#default-animations) | To configure which element properties are animated and how.
1212
| `clip` | `boolean` | No | `true` | Are the annotations clipped to the chartArea.
1313
| [`common`](#common) | `Object` | No | | To configure common options apply to all annotations
14-
| [`interaction`](options#interaction) | `Object` | No | `options.interaction` | To configure which events trigger plugin interactions
14+
| [`interaction`](options.md#interaction) | `Object` | No | `options.interaction` | To configure which events trigger plugin interactions
1515

1616
:::warning
1717

@@ -61,9 +61,9 @@ const options = {
6161

6262
The following options apply to all annotations unless they are overwritten on a per-annotation basis.
6363

64-
| Name | Type | [Scriptable](options#scriptable-options) | Default | Notes
64+
| Name | Type | [Scriptable](options.md#scriptable-options) | Default | Notes
6565
| ---- | ---- | :----: | ---- | ----
66-
| `drawTime` | `string` | Yes | `'afterDatasetsDraw'` | See [drawTime](options#draw-time).
66+
| `drawTime` | `string` | Yes | `'afterDatasetsDraw'` | See [drawTime](options.md#draw-time).
6767

6868
## Events
6969

docs/guide/migrationV2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ The following diagram is showing the element properties about a `'polygon'` anno
102102

103103
## Events
104104

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).
106106

107107
* 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`.
108108

docs/guide/options.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ The function receives 2 arguments, first is the [option context](#option-context
3737
/* <block:options:0> */
3838
const options = {
3939
plugins: {
40-
autocolors: false,
4140
annotation: {
4241
annotations: {
4342
box1: {

docs/guide/types/_commonInnerLabel.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@
22

33
Namespace: `options.annotations[annotationID].label`, it defines options for the the label of annotation.
44

5-
All of these options can be [Scriptable](../options#scriptable-options)
5+
All of these options can be [Scriptable](../options.md#scriptable-options)
66

77
| Name | Type | Default | Notes
88
| ---- | ---- | :----: | ----
9-
| `color` | [`Color`](../options#color) | `'black'` | Text color.
9+
| `color` | [`Color`](../options.md#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
13-
| `font` | [`Font`](../options#font) | `{ weight: 'bold' }` | Label font
12+
| `drawTime` | `string` | `options.drawTime` | See [drawTime](../options.md#draw-time). Defaults to the annotation draw time if unset
13+
| `font` | [`Font`](../options.md#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.
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.
1616
| [`position`](#position) | `string`\|`{x: string, y: string}` | `'center'` | Anchor position of label in the annotation.
1717
| `rotation` | `number` | `undefined` | Rotation of label, in degrees. If `undefined`, the annotation rotation is used.
1818
| `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.
2020
| `textStrokeWidth` | `number` | `0` | Stroke width around the text.
2121
| `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.
2222
| `xAdjust` | `number` | `0` | Adjustment along x-axis (left-right) of label relative to computed position. Negative values move the label left, positive right.

docs/guide/types/_commonOptions.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
The following options are available for all annotations.
44

5-
| Name | Type | [Scriptable](../options#scriptable-options) | Default
5+
| Name | Type | [Scriptable](../options.md#scriptable-options) | Default
66
| ---- | ---- | :----: | ----
77
| [`adjustScaleRange`](#general) | `boolean` | Yes | `true`
8-
| [`backgroundColor`](#styling) | [`Color`](../options#color) | Yes | `options.color`
9-
| [`borderColor`](#styling) | [`Color`](../options#color) | Yes | `options.color`
8+
| [`backgroundColor`](#styling) | [`Color`](../options.md#color) | Yes | `options.color`
9+
| [`borderColor`](#styling) | [`Color`](../options.md#color) | Yes | `options.color`
1010
| [`borderDash`](#styling) | `number[]` | Yes | `[]`
1111
| [`borderDashOffset`](#styling) | `number` | Yes | `0`
12-
| [`borderShadowColor`](#styling) | [`Color`](../options#color) | Yes | `'transparent'`
12+
| [`borderShadowColor`](#styling) | [`Color`](../options.md#color) | Yes | `'transparent'`
1313
| [`display`](#general) | `boolean` | Yes | `true`
1414
| [`drawTime`](#general) | `string` | Yes | `'afterDatasetsDraw'`
1515
| [`id`](#general) | `string` | No | `undefined`

docs/guide/types/box.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ Box annotations are used to draw rectangles on the chart area. This can be usefu
66
/* <block:options:0> */
77
const options = {
88
plugins: {
9-
autocolors: false,
109
annotation: {
1110
annotations: {
1211
box1: {
@@ -51,9 +50,9 @@ module.exports = {
5150

5251
The following options are available for box annotations.
5352

54-
| Name | Type | [Scriptable](../options#scriptable-options) | Default
53+
| Name | Type | [Scriptable](../options.md#scriptable-options) | Default
5554
| ---- | ---- | :----: | ----
56-
| [`backgroundShadowColor`](#styling) | [`Color`](../options#color) | Yes | `'transparent'`
55+
| [`backgroundShadowColor`](#styling) | [`Color`](../options.md#color) | Yes | `'transparent'`
5756
| [`borderCapStyle`](#styling) | `string` | Yes | `'butt'`
5857
| [`borderJoinStyle`](#styling) | `string` | Yes | `'miter'`
5958
| [`borderRadius`](#styling) | `number` \| `object` | Yes | `0`
@@ -71,7 +70,7 @@ If one of the axes does not match an axis in the chart, the box will take the en
7170
| ---- | ----
7271
| `adjustScaleRange` | Should the scale range be adjusted if this annotation is out of range.
7372
| `display` | Whether or not this annotation is visible.
74-
| `drawTime` | See [drawTime](../options#draw-time).
73+
| `drawTime` | See [drawTime](../options.md#draw-time).
7574
| `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.
7675
| `rotation` | Rotation of the box in degrees.
7776
| `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
112111

113112
![box](../../img/elementBoxProps.png)
114113

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`.

docs/guide/types/ellipse.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ Ellipse annotations are used to draw circles on the chart area. This can be usef
66
/* <block:options:0> */
77
const options = {
88
plugins: {
9-
autocolors: false,
109
annotation: {
1110
annotations: {
1211
ellipse1: {
@@ -51,9 +50,9 @@ module.exports = {
5150

5251
The following options are available for ellipse annotations.
5352

54-
| Name | Type | [Scriptable](../options#scriptable-options) | Default
53+
| Name | Type | [Scriptable](../options.md#scriptable-options) | Default
5554
| ---- | ---- | :----: | ----
56-
| [`backgroundShadowColor`](#styling) | [`Color`](../options#color) | Yes | `'transparent'`
55+
| [`backgroundShadowColor`](#styling) | [`Color`](../options.md#color) | Yes | `'transparent'`
5756
| [`borderWidth`](#styling) | `number`| Yes | `1`
5857
| [`label`](#label) | `object` | Yes |
5958
| [`rotation`](#general) | `number`| Yes | `0`
@@ -68,7 +67,7 @@ If one of the axes does not match an axis in the chart, the ellipse will take th
6867
| ---- | ----
6968
| `adjustScaleRange` | Should the scale range be adjusted if this annotation is out of range.
7069
| `display` | Whether or not this annotation is visible.
71-
| `drawTime` | See [drawTime](../options#draw-time).
70+
| `drawTime` | See [drawTime](../options.md#draw-time).
7271
| `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.
7372
| `rotation` | Rotation of the ellipse in degrees, default is 0.
7473
| `xMax` | Right edge of the ellipse in units along the x axis.

docs/guide/types/label.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ Label annotations are used to add contents on the chart area. This can be useful
66
/* <block:options:0> */
77
const options = {
88
plugins: {
9-
autocolors: false,
109
annotation: {
1110
annotations: {
1211
label1: {
@@ -53,23 +52,23 @@ module.exports = {
5352

5453
The following options are available for label annotations.
5554

56-
| Name | Type | [Scriptable](../options#scriptable-options) | Default
55+
| Name | Type | [Scriptable](../options.md#scriptable-options) | Default
5756
| ---- | ---- | :----: | ----
58-
| [`backgroundShadowColor`](#styling) | [`Color`](../options#color) | Yes | `'transparent'`
57+
| [`backgroundShadowColor`](#styling) | [`Color`](../options.md#color) | Yes | `'transparent'`
5958
| [`borderCapStyle`](#styling) | `string` | Yes | `'butt'`
6059
| [`borderJoinStyle`](#styling) | `string` | Yes | `'miter'`
6160
| [`borderRadius`](#borderradius) | `number` \| `object` | Yes | `0`
6261
| [`borderWidth`](#styling) | `number`| Yes | `0`
6362
| [`callout`](#callout) | `object` | Yes |
64-
| [`color`](#styling) | [`Color`](../options#color) | Yes | `'black'`
63+
| [`color`](#styling) | [`Color`](../options.md#color) | Yes | `'black'`
6564
| [`content`](#general) | `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) | Yes | `null`
66-
| [`font`](#styling) | [`Font`](../options#font) | Yes | `{}`
65+
| [`font`](#styling) | [`Font`](../options.md#font) | Yes | `{}`
6766
| [`height`](#general) | `number`\|`string` | Yes | `undefined`
68-
| [`padding`](#general) | [`Padding`](../options#padding) | Yes | `6`
67+
| [`padding`](#general) | [`Padding`](../options.md#padding) | Yes | `6`
6968
| [`position`](#position) | `string`\|`{x: string, y: string}` | Yes | `'center'`
7069
| [`rotation`](#general) | `number`| Yes | `0`
7170
| [`textAlign`](#general) | `string` | Yes | `'center'`
72-
| [`textStrokeColor`](#styling) | [`Color`](../options#color) | Yes | `undefined`
71+
| [`textStrokeColor`](#styling) | [`Color`](../options.md#color) | Yes | `undefined`
7372
| [`textStrokeWidth`](#styling) | `number` | Yes | `0`
7473
| [`width`](#general) | `number`\|`string` | Yes | `undefined`
7574
| [`xAdjust`](#general) | `number` | Yes | `0`
@@ -90,7 +89,7 @@ The 4 coordinates, xMin, xMax, yMin, yMax are optional. If not specified, the bo
9089
| `adjustScaleRange` | Should the scale range be adjusted if this annotation is out of range.
9190
| `content` | The content to show in the text annotation.
9291
| `display` | Whether or not this annotation is visible.
93-
| `drawTime` | See [drawTime](../options#draw-time).
92+
| `drawTime` | See [drawTime](../options.md#draw-time).
9493
| `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.
9594
| `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.
9695
| `padding` | The padding to add around the text label.
@@ -155,7 +154,6 @@ Namespace: `options.annotations[annotationID].callout`, it defines options for t
155154
/* <block:options:0> */
156155
const options = {
157156
plugins: {
158-
autocolors: false,
159157
annotation: {
160158
annotations: {
161159
label1: {
@@ -203,12 +201,12 @@ module.exports = {
203201
};
204202
```
205203

206-
All of these options can be [Scriptable](../options#scriptable-options).
204+
All of these options can be [Scriptable](../options.md#scriptable-options).
207205

208206
| Name | Type | Default | Notes
209207
| ---- | ---- | :----: | ----
210208
| `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.
212210
| `borderDash` | `number[]` | `[]` | Length and spacing of dashes of callout. See [MDN](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/setLineDash).
213211
| `borderDashOffset` | `number` | `0` | Offset for line dashes of callout. See [MDN](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/lineDashOffset).
214212
| `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

Comments
 (0)