Skip to content

Commit

Permalink
Docs/update scale position type (#9812)
Browse files Browse the repository at this point in the history
* update type of scale position in docs, add explanation sentence to object position

* improve clarification

* grammar/spelling
  • Loading branch information
LeeLenaleee committed Nov 7, 2021
1 parent 67c5a85 commit 681ada5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/axes/cartesian/_common.md
Expand Up @@ -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'`.
Expand Down
2 changes: 1 addition & 1 deletion docs/axes/cartesian/index.md
Expand Up @@ -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 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
Expand Down

0 comments on commit 681ada5

Please sign in to comment.