]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Move pointStyle types and update plugin link&render chart (#9479)
authorJacco van den Berg <39033624+LeeLenaleee@users.noreply.github.com>
Fri, 30 Jul 2021 12:14:07 +0000 (14:14 +0200)
committerGitHub <noreply@github.com>
Fri, 30 Jul 2021 12:14:07 +0000 (08:14 -0400)
* Place canvasElement on next line to keep table clean

* move typing to global location, update plugin page

docs/charts/bar.md
docs/charts/bubble.md
docs/charts/line.md
docs/charts/radar.md
docs/configuration/elements.md
docs/configuration/legend.md
docs/developers/plugins.md
docs/developers/render_flowchart.png

index f7182b10ee9ae1b7103f957827d692676d3e99cc..0543fed6469dbcfc4a7d312fb3d2c81e2b9fda3e 100644 (file)
@@ -90,7 +90,7 @@ Only the `data` option needs to be specified in the dataset namespace.
 | [`minBarLength`](#styling) | `number` | - | - | |
 | [`label`](#general) | `string` | - | - | `''`
 | [`order`](#general) | `number` | - | - | `0`
-| [`pointStyle`](../configuration/elements.md#point-styles) | `string`\|`Image`\|`HTMLCanvasElement` | Yes | - | `'circle'`
+| [`pointStyle`](../configuration/elements.md#point-styles) | [`pointStyle`](../configuration/elements.md#types) | Yes | - | `'circle'`
 | [`skipNull`](#general) | `boolean` | - | - | |
 | [`stack`](#general) | `string` | - | - | `'bar'` |
 | [`xAxisID`](#general) | `string` | - | - | first x axis
index 4f4071296831fdbd1b446c29136caab820d5bd63..44bd9bf2b115e098da7494a1f1815abe236ea153 100644 (file)
@@ -60,7 +60,7 @@ The bubble chart allows a number of properties to be specified for each dataset.
 | [`hitRadius`](#interactions) | `number` | Yes | Yes | `1`
 | [`label`](#general) | `string` | - | - | `undefined`
 | [`order`](#general) | `number` | - | - | `0`
-| [`pointStyle`](#styling) | `string`\|`Image`\|`HTMLCanvasElement` | Yes | Yes | `'circle'`
+| [`pointStyle`](#styling) | [`pointStyle`](../configuration/elements.md#types) | Yes | Yes | `'circle'`
 | [`rotation`](#styling) | `number` | Yes | Yes | `0`
 | [`radius`](#styling) | `number` | Yes | Yes | `3`
 
index ff926a50495d15456e20f28464d4c3e7cfb97b78..a41d79d184238084b02863106e053a53d942fdc8 100644 (file)
@@ -75,7 +75,7 @@ The line chart allows a number of properties to be specified for each dataset. T
 | [`pointHoverRadius`](#interactions) | `number` | Yes | Yes | `4`
 | [`pointRadius`](#point-styling) | `number` | Yes | Yes | `3`
 | [`pointRotation`](#point-styling) | `number` | Yes | Yes | `0`
-| [`pointStyle`](#point-styling) | `string`\|`Image`\|`HTMLCanvasElement` | Yes | Yes | `'circle'`
+| [`pointStyle`](#point-styling) | [`pointStyle`](../configuration/elements.md#types) | Yes | Yes | `'circle'`
 | [`segment`](#segment) | `object` | - | - | `undefined`
 | [`showLine`](#line-styling) | `boolean` | - | - | `true`
 | [`spanGaps`](#line-styling) | `boolean`\|`number` | - | - | `undefined`
index fb425c56ef825456ae25406e63f671d47cd13933..5281a73f7e1410f0e1f1d0d27207eb44495de358 100644 (file)
@@ -104,7 +104,7 @@ The radar chart allows a number of properties to be specified for each dataset.
 | [`pointHoverRadius`](#interactions) | `number` | Yes | Yes | `4`
 | [`pointRadius`](#point-styling) | `number` | Yes | Yes | `3`
 | [`pointRotation`](#point-styling) | `number` | Yes | Yes | `0`
-| [`pointStyle`](#point-styling) | `string`\|`Image`\|`HTMLCanvasElement` | Yes | Yes | `'circle'`
+| [`pointStyle`](#point-styling) | [`pointStyle`](../configuration/elements.md#types) | Yes | Yes | `'circle'`
 | [`spanGaps`](#line-styling) | `boolean` | - | - | `undefined`
 
 All these values, if `undefined`, fallback to the scopes described in [option resolution](../general/options)
index af39cdb3d79fad08dc5558230952df70622e7465..ffdeff3c41cecac62e61b66fb2bc8c478518beb1 100644 (file)
@@ -19,7 +19,7 @@ Namespace: `options.elements.point`, global point options: `Chart.defaults.eleme
 | Name | Type | Default | Description
 | ---- | ---- | ------- | -----------
 | `radius` | `number` | `3` | Point radius.
-| [`pointStyle`](#point-styles) | `string`\|`Image`\|`HTMLCanvasElement` | `'circle'` | Point style.
+| [`pointStyle`](#point-styles) | [`pointStyle`](#types) | `'circle'` | Point style.
 | `rotation` | `number` | `0` | Point rotation (in degrees).
 | `backgroundColor` | [`Color`](../general/colors.md) | `Chart.defaults.backgroundColor` | Point fill color.
 | `borderWidth` | `number` | `1` | Point stroke width.
@@ -30,7 +30,12 @@ Namespace: `options.elements.point`, global point options: `Chart.defaults.eleme
 
 ### Point Styles
 
-The following values are supported:
+#### Types
+
+The `pointStyle` argument accepts the following type of inputs: `string`, `Image` and `HTMLCanvasElement`
+
+#### Info
+When a string is provided, the following values are supported:
 
 - `'circle'`
 - `'cross'`
index 77aa9e0ab674f4903d8805429485a1a95f7cc999..e0ff5ac7f5dc8354fad80ff3e0e781b711170e03 100644 (file)
@@ -59,7 +59,7 @@ Namespace: `options.plugins.legend.labels`
 | `generateLabels` | `function` | | Generates legend items for each thing in the legend. Default implementation returns the text + styling for the color box. See [Legend Item](#legend-item-interface) for details.
 | `filter` | `function` | `null` | Filters legend items out of the legend. Receives 2 parameters, a [Legend Item](#legend-item-interface) and the chart data.
 | `sort` | `function` | `null` | Sorts legend items. Receives 3 parameters, two [Legend Items](#legend-item-interface) and the chart data.
-| [`pointStyle`](elements.md#point-styles) | `string`\|`Image`\|`HTMLCanvasElement` | `'circle'` | If specified, this style of point is used for the legend. Only used if `usePointStyle` is true.
+| [`pointStyle`](elements.md#point-styles) | [`pointStyle`](elements.md#types) | `'circle'` | If specified, this style of point is used for the legend. Only used if `usePointStyle` is true.
 | `textAlign` | `string` | `'center'` | Horizontal alignment of the label text. Options are: `'left'`, `'right'` or `'center'`.
 | `usePointStyle` | `boolean` | `false` | Label style will match corresponding point style (size is based on the minimum value between boxWidth and font.size).
 
index 2fe6eb4b6283a2b14a91f282b7b3c4eb9b7184d9..0144839c3b2ffb092f6534aaec0f385fab47b59e 100644 (file)
@@ -122,7 +122,7 @@ var chart = new Chart(ctx, {
 
 ## Plugin Core API
 
-Read more about the [existing plugin extension hooks](../api/interfaces/plugin).
+Read more about the [existing plugin extension hooks](../api/interfaces/Plugin).
 
 ### Chart Initialization
 
index a140c55c0a5f3fd1391cb873ded829cf6da21a9f..211cc16048656b7c3caa8e390fda7d73daa4bece 100644 (file)
Binary files a/docs/developers/render_flowchart.png and b/docs/developers/render_flowchart.png differ