]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Align axes documentation with the changes (#7624)
authorJukka Kurkela <jukka.kurkela@gmail.com>
Wed, 15 Jul 2020 22:12:15 +0000 (01:12 +0300)
committerGitHub <noreply@github.com>
Wed, 15 Jul 2020 22:12:15 +0000 (18:12 -0400)
docs/docs/axes/cartesian/category.md
docs/docs/axes/cartesian/index.md
docs/docs/axes/cartesian/time.md
docs/docs/axes/index.md
docs/docs/axes/styling.md

index 8dda94b28b9be9d50ee76a122117e76d19b49194..c536e6ba5f769195b5bd8666d3378341813e8881 100644 (file)
@@ -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` | <code>string&#124;number</code> | | The minimum item to display. [more...](#min-max-configuration)
-| `max` | <code>string&#124;number</code> | | The maximum item to display. [more...](#min-max-configuration)
 
 ## Min Max Configuration
 
index 88328a71069a87a6022d89c4b1842b2c47f457a7..2fa707cc9c0153a872eda6aa56058cd9294dafc7 100644 (file)
@@ -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.
index 63463ad938f42696700fbdf53047d30ff846c7c2..6fb5d1a36e749181f920f8b880cac18733540f23 100644 (file)
@@ -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` | <code>string&#124;function</code> | | 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, {
index d9f830ce7b859e0cd9545c1a86344e597b13ca2d..c50e7c198d07c82eee16c4d3665126722a23720d 100644 (file)
@@ -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
index 0e101eb758b862b6a52fb15f14e799ea51ec5b7f..a9c8f1a0b5155c44b0a447a8e86a58e1151f06c9 100644 (file)
@@ -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 &lt;= 0 are drawn under datasets, &gt; 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.
-