From 9c39df3571e904f2542a8d8aa72fd6424b3b276e Mon Sep 17 00:00:00 2001 From: Jukka Kurkela Date: Fri, 16 Apr 2021 22:12:36 +0300 Subject: [PATCH] Fix minor issues in docs --- docs/.vuepress/config.js | 1 - docs/axes/cartesian/_common_ticks.md | 2 +- docs/axes/cartesian/index.md | 10 +++++----- docs/axes/index.md | 4 ++-- docs/configuration/elements.md | 16 ++++++++-------- docs/configuration/tooltip.md | 2 +- docs/general/padding.md | 2 +- docs/general/performance.md | 6 +++--- docs/getting-started/index.md | 6 +++--- docs/getting-started/v3-migration.md | 4 ++-- 10 files changed, 26 insertions(+), 27 deletions(-) diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 65ba928922e..3af68dfdb48 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -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', diff --git a/docs/axes/cartesian/_common_ticks.md b/docs/axes/cartesian/_common_ticks.md index 1013844efbb..12c9114670c 100644 --- a/docs/axes/cartesian/_common_ticks.md +++ b/docs/axes/cartesian/_common_ticks.md @@ -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. diff --git a/docs/axes/cartesian/index.md b/docs/axes/cartesian/index.md index 3995d49665d..c4fc4f2ecac 100644 --- a/docs/axes/cartesian/index.md +++ b/docs/axes/cartesian/index.md @@ -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 diff --git a/docs/axes/index.md b/docs/axes/index.md index 019836628ff..838f5fe8d4d 100644 --- a/docs/axes/index.md +++ b/docs/axes/index.md @@ -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. diff --git a/docs/configuration/elements.md b/docs/configuration/elements.md index 9398435b0aa..cc050b64d3d 100644 --- a/docs/configuration/elements.md +++ b/docs/configuration/elements.md @@ -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. diff --git a/docs/configuration/tooltip.md b/docs/configuration/tooltip.md index 3c9764488de..34e3fd821d2 100644 --- a/docs/configuration/tooltip.md +++ b/docs/configuration/tooltip.md @@ -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 diff --git a/docs/general/padding.md b/docs/general/padding.md index e07bb6290fc..5530368b188 100644 --- a/docs/general/padding.md +++ b/docs/general/padding.md @@ -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, { diff --git a/docs/general/performance.md b/docs/general/performance.md index 62d6e76bee8..7aadb158bb6 100644 --- a/docs/general/performance.md +++ b/docs/general/performance.md @@ -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 diff --git a/docs/getting-started/index.md b/docs/getting-started/index.md index 8513c04ae9d..24957e038c0 100644 --- a/docs/getting-started/index.md +++ b/docs/getting-started/index.md @@ -55,10 +55,10 @@ module.exports = { Finally, render the chart using our configuration: -```html +```html