From: Jukka Kurkela Date: Wed, 15 Jul 2020 22:12:15 +0000 (+0300) Subject: Align axes documentation with the changes (#7624) X-Git-Tag: v3.0.0-beta.2~42 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=74ef7d5718e09c36a5aa390270608beed4fac31e;p=thirdparty%2FChart.js.git Align axes documentation with the changes (#7624) --- diff --git a/docs/docs/axes/cartesian/category.md b/docs/docs/axes/cartesian/category.md index 8dda94b28..c536e6ba5 100644 --- a/docs/docs/axes/cartesian/category.md +++ b/docs/docs/axes/cartesian/category.md @@ -37,15 +37,15 @@ let chart = new Chart(ctx, { }); ``` -## Tick Configuration Options +## Configuration Options -The category scale provides the following options for configuring tick marks. They are nested in the `ticks` sub object. These options extend the [common tick configuration](index.md#tick-configuration). +These options extend the [common configuration for all cartesian axes](index.md#configuration-options). -| Name | Type | Default | Description -| ---- | ---- | ------- | ----------- +| Name | Type | Description +| ---- | ---- | ----------- +| `min` | `string`\|`number` | | The minimum item to display. [more...](#min-max-configuration) +| `max` | `string`\|`number` | | The maximum item to display. [more...](#min-max-configuration) | `labels` | `string[]` | - | An array of labels to display. -| `min` | string|number | | The minimum item to display. [more...](#min-max-configuration) -| `max` | string|number | | The maximum item to display. [more...](#min-max-configuration) ## Min Max Configuration diff --git a/docs/docs/axes/cartesian/index.md b/docs/docs/axes/cartesian/index.md index 88328a710..2fa707cc9 100644 --- a/docs/docs/axes/cartesian/index.md +++ b/docs/docs/axes/cartesian/index.md @@ -18,6 +18,8 @@ All of the included cartesian axes support a number of common options. These opt | `type` | `string` | | Type of scale being employed. Custom scales can be created and registered with a string key. This allows changing the type of an axis for a chart. | `position` | `string` | | Position of the axis. [more...](#axis-position) | `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'`. +| `min` | `number` | | User defined minimum value for the scale, overrides minimum value from data. +| `max` | `number` | | User defined maximum value for the scale, overrides maximum value from data. | `offset` | `boolean` | `false` | If true, extra space is added to the both edges and the axis is scaled to fit into the chart area. This is set to `true` for a bar chart by default. | `gridLines` | `object` | | Grid line configuration. [more...](../styling.md#grid-line-configuration) | `scaleLabel` | `object` | | Scale title configuration. [more...](../labelling.md#scale-title-configuration) @@ -45,8 +47,6 @@ The following options are common to all cartesian axes but do not apply to other | Name | Type | Default | Description | ---- | ---- | ------- | ----------- -| `min` | `number` | | User defined minimum value for the scale, overrides minimum value from data. -| `max` | `number` | | User defined maximum value for the scale, overrides maximum value from data. | `sampleSize` | `number` | `ticks.length` | The number of ticks to examine when deciding how many labels will fit. Setting a smaller value will be faster, but may be less accurate when there is large variability in label length. | `autoSkip` | `boolean` | `true` | If true, automatically calculates how many labels can be shown and hides labels accordingly. Labels will be rotated up to `maxRotation` before skipping any. Turn `autoSkip` off to show all labels no matter what. | `autoSkipPadding` | `number` | `0` | Padding between the ticks on the horizontal axis when `autoSkip` is enabled. diff --git a/docs/docs/axes/cartesian/time.md b/docs/docs/axes/cartesian/time.md index 63463ad93..6fb5d1a36 100644 --- a/docs/docs/axes/cartesian/time.md +++ b/docs/docs/axes/cartesian/time.md @@ -29,7 +29,7 @@ The following options are provided by the time scale. You may also set options p | `ticks.source` | `string` | `'auto'` | How ticks are generated. [more...](#ticks-source) | `time.displayFormats` | `object` | | Sets how different time units are displayed. [more...](#display-formats) | `time.isoWeekday` | `boolean` | `false` | If true and the unit is set to 'week', then the first day of the week will be Monday. Otherwise, it will be Sunday. -| `time.parser` | string|function | | Custom parser for dates. [more...](#parser) +| `time.parser` | `string`\|`function` | | Custom parser for dates. [more...](#parser) | `time.round` | `string` | `false` | If defined, dates will be rounded to the start of this unit. See [Time Units](#time-units) below for the allowed units. | `time.tooltipFormat` | `string` | | The format string to use for the tooltip. | `time.unit` | `string` | `false` | If defined, will force the unit to be a certain type. See [Time Units](#time-units) section below for details. @@ -85,7 +85,7 @@ You may specify a map of display formats with a key for each unit: The format string used as a value depends on the date adapter you chose to use. -For example, to set the display format for the `quarter` unit to show the month and year, the following config might be passed to the chart constructor. +For example, to set the display format for the `quarter` unit to show the month and year, the following config might be passed to the chart constructor. ```javascript var chart = new Chart(ctx, { diff --git a/docs/docs/axes/index.md b/docs/docs/axes/index.md index d9f830ce7..c50e7c198 100644 --- a/docs/docs/axes/index.md +++ b/docs/docs/axes/index.md @@ -20,6 +20,7 @@ The following options are common to all axes provided by Chart.js. | Name | Type | Default | Description | ---- | ---- | ------- | ----------- | `display` | `boolean`\|`string` | `true` | Controls the axis global visibility (visible when `true`, hidden when `false`). When `display: 'auto'`, the axis is visible only if at least one associated dataset is visible. +| `reverse` | `boolean` | `false` | Reverse the scale. | `weight` | `number` | `0` | The weight used to sort the axis. Higher weights are further away from the chart area. ### Callbacks diff --git a/docs/docs/axes/styling.md b/docs/docs/axes/styling.md index 0e101eb75..a9c8f1a0b 100644 --- a/docs/docs/axes/styling.md +++ b/docs/docs/axes/styling.md @@ -47,7 +47,6 @@ The tick configuration is nested under the scale configuration in the `ticks` ke | `font` | `Font` | Yes | `defaults.font` | See [Fonts](../general/fonts.md) | `major` | `object` | | `{}` | [Major ticks configuration](#major-tick-configuration). | `padding` | `number` | | `0` | Sets the offset of the tick labels from the axis -| `reverse` | `boolean` | | `false` | Reverses order of tick labels. | `z` | `number` | | `0` | z-index of tick layer. Useful when ticks are drawn on chart area. Values <= 0 are drawn under datasets, > 0 on top. The scriptable context is the same as for the [Grid Line Configuration](#grid-line-configuration). @@ -59,4 +58,3 @@ The majorTick configuration is nested under the ticks configuration in the `majo | Name | Type | Default | Description | ---- | ---- | ------- | ----------- | `enabled` | `boolean` | `false` | If true, major ticks are generated. A major tick will affect autoskipping and `major` will be defined on ticks in the scriptable options context. -