From f2362b455d5a800e0788c2287bc01e7668580ae6 Mon Sep 17 00:00:00 2001 From: Jacco van den Berg Date: Mon, 1 Nov 2021 01:15:39 +0100 Subject: [PATCH 1/3] update type of scale position in docs, add explanation sentence to object position --- docs/axes/cartesian/_common.md | 2 +- docs/axes/cartesian/index.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/axes/cartesian/_common.md b/docs/axes/cartesian/_common.md index a9082b55fd5..1050a85a2a6 100644 --- a/docs/axes/cartesian/_common.md +++ b/docs/axes/cartesian/_common.md @@ -5,7 +5,7 @@ Namespace: `options.scales[scaleId]` | Name | Type | Default | Description | ---- | ---- | ------- | ----------- | `bounds` | `string` | `'ticks'` | Determines the scale bounds. [more...](./index.md#scale-bounds) -| `position` | `string` | | Position of the axis. [more...](./index.md#axis-position) +| `position` | `string` \| `object` | | Position of the axis. [more...](./index.md#axis-position) | `stack` | `string` | | Stack group. Axes at the same `position` with same `stack` are stacked. | `stackWeight` | `number` | 1 | Weight of the scale in stack group. Used to determine the amount of allocated space for the scale within the group. | `axis` | `string` | | Which type of axis this is. Possible values are: `'x'`, `'y'`. If not set, this is inferred from the first character of the ID which should be `'x'` or `'y'`. diff --git a/docs/axes/cartesian/index.md b/docs/axes/cartesian/index.md index 6054f4d84a7..0acfb2e0f3b 100644 --- a/docs/axes/cartesian/index.md +++ b/docs/axes/cartesian/index.md @@ -201,7 +201,7 @@ module.exports = { An axis can either be positioned at the edge of the chart, at the center of the chart area, or dynamically with respect to a data value. To position the axis at the edge of the chart, set the `position` option to one of: `'top'`, `'left'`, `'bottom'`, `'right'`. -To position the axis at the center of the chart area, set the `position` option to `'center'`. In this mode, either the `axis` option is specified or the axis ID starts with the letter 'x' or 'y'. +To position the axis at the center of the chart area, set the `position` option to `'center'`. In this mode, either the `axis` option must be specified or the axis ID has starts with the letter 'x' or 'y'. This is so chart.js knows what kind of axis it is. To position the axis with respect to a data value, set the `position` option to an object such as: ```javascript From f62a58d7b9c6b042b0e99c68de4e06d708449ff8 Mon Sep 17 00:00:00 2001 From: Jacco van den Berg Date: Mon, 1 Nov 2021 01:19:22 +0100 Subject: [PATCH 2/3] improve clarification --- docs/axes/cartesian/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/axes/cartesian/index.md b/docs/axes/cartesian/index.md index 0acfb2e0f3b..e360f8d817b 100644 --- a/docs/axes/cartesian/index.md +++ b/docs/axes/cartesian/index.md @@ -201,7 +201,7 @@ module.exports = { An axis can either be positioned at the edge of the chart, at the center of the chart area, or dynamically with respect to a data value. To position the axis at the edge of the chart, set the `position` option to one of: `'top'`, `'left'`, `'bottom'`, `'right'`. -To position the axis at the center of the chart area, set the `position` option to `'center'`. In this mode, either the `axis` option must be specified or the axis ID has starts with the letter 'x' or 'y'. This is so chart.js knows what kind of axis it is. +To position the axis at the center of the chart area, set the `position` option to `'center'`. In this mode, either the `axis` option must be specified or the axis ID has starts with the letter 'x' or 'y'. This is so chart.js knows what kind of axis (horizontal or vertical) it is. To position the axis with respect to a data value, set the `position` option to an object such as: ```javascript From 63f3398c994023e47a686479594b989fc51974f9 Mon Sep 17 00:00:00 2001 From: Jacco van den Berg Date: Mon, 1 Nov 2021 01:20:38 +0100 Subject: [PATCH 3/3] grammar/spelling --- docs/axes/cartesian/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/axes/cartesian/index.md b/docs/axes/cartesian/index.md index e360f8d817b..e33dc105cf6 100644 --- a/docs/axes/cartesian/index.md +++ b/docs/axes/cartesian/index.md @@ -201,7 +201,7 @@ module.exports = { An axis can either be positioned at the edge of the chart, at the center of the chart area, or dynamically with respect to a data value. To position the axis at the edge of the chart, set the `position` option to one of: `'top'`, `'left'`, `'bottom'`, `'right'`. -To position the axis at the center of the chart area, set the `position` option to `'center'`. In this mode, either the `axis` option must be specified or the axis ID has starts with the letter 'x' or 'y'. This is so chart.js knows what kind of axis (horizontal or vertical) it is. +To position the axis at the center of the chart area, set the `position` option to `'center'`. In this mode, either the `axis` option must be specified or the axis ID has to start with the letter 'x' or 'y'. This is so chart.js knows what kind of axis (horizontal or vertical) it is. To position the axis with respect to a data value, set the `position` option to an object such as: ```javascript