]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Fix minor issues in docs (#8910)
authorJukka Kurkela <jukka.kurkela@gmail.com>
Fri, 16 Apr 2021 19:46:14 +0000 (22:46 +0300)
committerGitHub <noreply@github.com>
Fri, 16 Apr 2021 19:46:14 +0000 (15:46 -0400)
docs/.vuepress/config.js
docs/axes/cartesian/_common_ticks.md
docs/axes/cartesian/index.md
docs/axes/index.md
docs/configuration/elements.md
docs/configuration/tooltip.md
docs/general/padding.md
docs/general/performance.md
docs/getting-started/index.md
docs/getting-started/v3-migration.md

index 65ba928922e131cc55f8182141df403a82ffe804..3af68dfdb480956f80b64e2fb1c1e1142c74cf55 100644 (file)
@@ -113,7 +113,6 @@ module.exports = {
     nav: [
       {text: 'Home', link: '/'},
       {text: 'API', link: '/api/'},
-      // TODO: Make local when samples moved to vuepress
       {text: 'Samples', link: `/samples/`},
       {
         text: 'Ecosystem',
index 1013844efbbb3058cf46e943ed8693f977d5e224..12c9114670c9908ab2bbc5120b05487d4fd478b7 100644 (file)
@@ -5,7 +5,7 @@ Namespace: `options.scales[scaleId].ticks`
 | Name | Type | Default | Description
 | ---- | ---- | ------- | -----------
 | `align` | `string` | `'center'` | The tick alignment along the axis. Can be `'start'`, `'center'`, or `'end'`.
-| `crossAlign` | `string` | `'near'` | The tick alignment perpendicular to the axis. Can be `'near'`, `'center'`, or `'far'`. See [Tick Alignment](./index#tick-alignment)
+| `crossAlign` | `string` | `'near'` | The tick alignment perpendicular to the axis. Can be `'near'`, `'center'`, or `'far'`. See [Tick Alignment](/axes/cartesian/#tick-alignment)
 | `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` | `3` | Padding between the ticks on the horizontal axis when `autoSkip` is enabled.
index 3995d49665d696258fa4932f4d771e59a32f7bfd..c4fc4f2ecacb68dd839623564d63f57d9339f8bd 100644 (file)
@@ -2,11 +2,11 @@
 
 Axes that follow a cartesian grid are known as 'Cartesian Axes'. Cartesian axes are used for line, bar, and bubble charts. Four cartesian axes are included in Chart.js by default.
 
-* [linear](./linear)
-* [logarithmic](./logarithmic)
-* [category](./category)
-* [time](./time)
-* [timeseries](./timeseries)
+* [linear](./linear.md)
+* [logarithmic](./logarithmic.md)
+* [category](./category.md)
+* [time](./time.md)
+* [timeseries](./timeseries.md)
 
 ## Visual Components
 
index 019836628ffaa1b81b9cd2cca453ede63b9cbe9c..838f5fe8d4dd0ada9f7cf76b9a60f642945e5d6c 100644 (file)
@@ -1,8 +1,8 @@
 # Axes
 
-Axes are an integral part of a chart. They are used to determine how data maps to a pixel value on the chart. In a cartesian chart, there is 1 or more X-axis and 1 or more Y-axis to map points onto the 2-dimensional canvas. These axes are known as ['cartesian axes'](./cartesian/index#cartesian-axes).
+Axes are an integral part of a chart. They are used to determine how data maps to a pixel value on the chart. In a cartesian chart, there is 1 or more X-axis and 1 or more Y-axis to map points onto the 2-dimensional canvas. These axes are known as ['cartesian axes'](./cartesian/).
 
-In a radial chart, such as a radar chart or a polar area chart, there is a single axis that maps points in the angular and radial directions. These are known as ['radial axes'](./radial/index#radial-axes).
+In a radial chart, such as a radar chart or a polar area chart, there is a single axis that maps points in the angular and radial directions. These are known as ['radial axes'](./radial/).
 
 Scales in Chart.js >v2.0 are significantly more powerful, but also different than those of v1.0.
 
index 9398435b0aa993879c1bfbbcaa971d267c9cb811..cc050b64d3d7597cc1d7cf3004d9edbdee74accf 100644 (file)
@@ -54,16 +54,16 @@ Namespace: `options.elements.line`, global line options: `Chart.defaults.element
 | Name | Type | Default | Description
 | ---- | ---- | ------- | -----------
 | `tension` | `number` | `0` | Bézier curve tension (`0` for no Bézier curves).
-| `backgroundColor` | [`Color`](../general/colors.md) | `Chart.defaults.backgroundColor` | Line fill color.
+| `backgroundColor` | [`Color`](/general/colors.md) | `Chart.defaults.backgroundColor` | Line fill color.
 | `borderWidth` | `number` | `3` | Line stroke width.
-| `borderColor` | [`Color`](../general/colors.md) | `Chart.defaults.borderColor` | Line stroke color.
+| `borderColor` | [`Color`](/general/colors.md) | `Chart.defaults.borderColor` | Line stroke color.
 | `borderCapStyle` | `string` | `'butt'` | Line cap style. See [MDN](https://developer.mozilla.org/en/docs/Web/API/CanvasRenderingContext2D/lineCap).
 | `borderDash` | `number[]` | `[]` | Line dash. See [MDN](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/setLineDash).
 | `borderDashOffset` | `number` | `0.0` | Line dash offset. See [MDN](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/lineDashOffset).
 | `borderJoinStyle` | `string` | `'miter'` | Line join style. See [MDN](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/lineJoin).
 | `capBezierPoints` | `boolean` | `true` | `true` to keep Bézier control inside the chart, `false` for no restriction.
-| `cubicInterpolationMode` | `string` | `'default'` |  Interpolation mode to apply. [See more...](./charts/line.md/#cubicinterpolationmode)
-| `fill` | `boolean`\|`string` | `false` | How to fill the area under the line. See [area charts](../charts/area.md#filling-modes).
+| `cubicInterpolationMode` | `string` | `'default'` |  Interpolation mode to apply. [See more...](/charts/line.md/#cubicinterpolationmode)
+| `fill` | `boolean`\|`string` | `false` | How to fill the area under the line. See [area charts](/charts/area.md#filling-modes).
 | `stepped` | `boolean` | `false` | `true` to show the line as a stepped line (`tension` will be ignored).
 
 ## Bar Configuration
@@ -74,9 +74,9 @@ Namespace: `options.elements.bar`, global bar options: `Chart.defaults.elements.
 
 | Name | Type | Default | Description
 | ---- | ---- | ------- | -----------
-| `backgroundColor` | [`Color`](../general/colors.md) | `Chart.defaults.backgroundColor` | Bar fill color.
+| `backgroundColor` | [`Color`](/general/colors.md) | `Chart.defaults.backgroundColor` | Bar fill color.
 | `borderWidth` | `number` | `0` | Bar stroke width.
-| `borderColor` | [`Color`](../general/colors.md) | `Chart.defaults.borderColor` | Bar stroke color.
+| `borderColor` | [`Color`](/general/colors.md) | `Chart.defaults.borderColor` | Bar stroke color.
 | `borderSkipped` | `string` | `'start'` | Skipped (excluded) border: `'start'`, `'end'`, `'bottom'`, `'left'`, `'top'` or `'right'`.
 | `borderRadius` | `number`\|`object` | `0` | The bar border radius (in pixels).
 | [`pointStyle`](#point-styles) | `string`\|`Image` | `'circle'` | Style of the point for legend.
@@ -90,7 +90,7 @@ Namespace: `options.elements.arc`, global arc options: `Chart.defaults.elements.
 | Name | Type | Default | Description
 | ---- | ---- | ------- | -----------
 | `angle` - for polar only | `number` | `circumference / (arc count)` | Arc angle to cover.
-| `backgroundColor` | [`Color`](../general/colors.md) | `Chart.defaults.backgroundColor` | Arc fill color.
+| `backgroundColor` | [`Color`](/general/colors.md) | `Chart.defaults.backgroundColor` | Arc fill color.
 | `borderAlign` | `string` | `'center'` | Arc stroke alignment.
-| `borderColor` | [`Color`](../general/colors.md) | `'#fff'` | Arc stroke color.
+| `borderColor` | [`Color`](/general/colors.md) | `'#fff'` | Arc stroke color.
 | `borderWidth`| `number` | `2` | Arc stroke width.
index 3c9764488de3539811184c119e6b80cbac06818b..34e3fd821d263103495d985c5c3f3eafcc83ed6f 100644 (file)
@@ -332,7 +332,7 @@ var myPieChart = new Chart(ctx, {
 });
 ```
 
-See [samples](https://www.chartjs.org/samples/) for examples on how to get started with external tooltips.
+See [samples](/samples/tooltip/html) for examples on how to get started with external tooltips.
 
 ## Tooltip Model
 
index e07bb6290fc306029292bb54fdb9081dadfaa267..5530368b188a4616f12d7231a40659d7bd6d9f2a 100644 (file)
@@ -45,7 +45,7 @@ let chart = new Chart(ctx, {
 
 This is a shorthand for defining left/right and top/bottom to same values.
 
-For example, 10px left / right and 4px top / bottom padding on a Radial Linear Axis [tick backdropPadding](../axes/radial/linear#tick-configuration):
+For example, 10px left / right and 4px top / bottom padding on a Radial Linear Axis [tick backdropPadding](/axes/radial/linear.html#linear-radial-axis-specific-tick-options):
 
 ```javascript
 let chart = new Chart(ctx, {
index 62d6e76bee8e83ada03dc7e9e5b7154192742e88..7aadb158bb671fc37e718fd1504756d1e3f65bf6 100644 (file)
@@ -16,7 +16,7 @@ Chart.js is fastest if you provide data with indices that are unique, sorted, an
 
 Decimating your data will achieve the best results. When there is a lot of data to display on the graph, it doesn't make sense to show tens of thousands of data points on a graph that is only a few hundred pixels wide.
 
-The [decimation plugin](./configuration/decimation.md) can be used with line charts to decimate data before the chart is rendered. This will provide the best performance since it will reduce the memory needed to render the chart.
+The [decimation plugin](/configuration/decimation.md) can be used with line charts to decimate data before the chart is rendered. This will provide the best performance since it will reduce the memory needed to render the chart.
 
 Line charts are able to do [automatic data decimation during draw](#automatic-data-decimation-during-draw), when certain conditions are met. You should still consider decimating data yourself before passing it in for maximum performance since the automatic decimation occurs late in the chart life cycle.
 
@@ -24,11 +24,11 @@ Line charts are able to do [automatic data decimation during draw](#automatic-da
 
 ### Rotation
 
-[Specify a rotation value](./axes/cartesian/index.md#tick-configuration) by setting `minRotation` and `maxRotation` to the same value, which avoids the chart from having to automatically determine a value to use.
+[Specify a rotation value](/axes/cartesian/index.md#tick-configuration) by setting `minRotation` and `maxRotation` to the same value, which avoids the chart from having to automatically determine a value to use.
 
 ### Sampling
 
-Set the [`ticks.sampleSize`](./axes/cartesian/index.md#tick-configuration) option. This will determine how large your labels are by looking at only a subset of them in order to render axes more quickly. This works best if there is not a large variance in the size of your labels.
+Set the [`ticks.sampleSize`](/axes/cartesian/index.md#tick-configuration) option. This will determine how large your labels are by looking at only a subset of them in order to render axes more quickly. This works best if there is not a large variance in the size of your labels.
 
 ## Disable Animations
 
index 8513c04ae9dc992da828d026408628f8e183f0e2..24957e038c059d2eab3d78060669d083c99764e9 100644 (file)
@@ -55,10 +55,10 @@ module.exports = {
 
 Finally, render the chart using our configuration:
 
-```html  
+```html
 <script>
   // === include 'setup' then 'config' above ===
-  
+
   var myChart = new Chart(
     document.getElementById('myChart'),
     config
@@ -68,4 +68,4 @@ Finally, render the chart using our configuration:
 
 It's that easy to get started using Chart.js! From here you can explore the many options that can help you customise your charts with scales, tooltips, labels, colors, custom actions, and much more.
 
-All our examples are [available online](https://www.chartjs.org/samples/latest/) but you can also download the `Chart.js.zip` archive attached to every [release](https://github.com/chartjs/Chart.js/releases) to experiment with our samples locally from the `/samples` folder.
+All our examples are [available online](/samples/) but you can also download the `Chart.js.zip` archive attached to every [release](https://github.com/chartjs/Chart.js/releases) to experiment with our samples locally from the `/samples` folder.
index 3318499ce964ee0ed7eb394569669634ea78eb80..9372488bce432e5bc47c7b9a45e08618953997b7 100644 (file)
@@ -63,8 +63,8 @@ A number of changes were made to the configuration options passed to the `Chart`
 * The input properties of object data can now be freely specified, see [data structures](../general/data-structures.md) for details.
 * Most options are resolved utilizing proxies, instead of merging with defaults. In addition to easily enabling different resolution routes for different contexts, it allows using other resolved options in scriptable options.
   * Options are by default scriptable and indexable, unless disabled for some reason.
-  * Scriptable options receive a option reolver as second parameter for accessing other options in same context.
-  * Resolution falls to upper scopes, if no match is found earlier. See [options](./general/options.md) for details.
+  * Scriptable options receive a option resolver as second parameter for accessing other options in same context.
+  * Resolution falls to upper scopes, if no match is found earlier. See [options](../general/options.md) for details.
 
 #### Specific changes