You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/charts/radar.md
+75-41Lines changed: 75 additions & 41 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,46 +64,80 @@ var myRadarChart = new Chart(ctx, {
64
64
65
65
The radar chart allows a number of properties to be specified for each dataset. These are used to set display properties for a specific dataset. For example, the colour of a line is generally set this way.
66
66
67
-
All `point*` properties can be specified as an array. If these are set to an array value, the first value applies to the first point, the second value to the second point, and so on.
68
-
69
-
| Name | Type | Description
70
-
| ---- | ---- | -----------
71
-
| `label` | `string` | The label for the dataset which appears in the legend and tooltips.
72
-
| `backgroundColor` | `Color` | The fill color under the line. See [Colors](../general/colors.md#colors).
73
-
| `borderColor` | `Color` | The color of the line. See [Colors](../general/colors.md#colors).
74
-
| `borderWidth` | `number` | The width of the line in pixels.
75
-
| `borderDash` | `number[]` | Length and spacing of dashes. See [MDN](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/setLineDash).
76
-
| `borderDashOffset` | `number` | Offset for line dashes. See [MDN](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/lineDashOffset).
77
-
| `borderCapStyle` | `string` | Cap style of the line. See [MDN](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/lineCap).
78
-
| `borderJoinStyle` | `string` | Line joint style. See [MDN](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/lineJoin).
79
-
| `fill` | <code>boolean|string</code> | How to fill the area under the line. See [area charts](area.md).
80
-
| `lineTension` | `number` | Bezier curve tension of the line. Set to 0 to draw straightlines.
81
-
| `pointBackgroundColor` | <code>Color|Color[]</code> | The fill color for points.
82
-
| `pointBorderColor` | <code>Color|Color[]</code> | The border color for points.
83
-
| `pointBorderWidth` | <code>number|number[]</code> | The width of the point border in pixels.
84
-
| `pointRadius` | <code>number|number[]</code> | The radius of the point shape. If set to 0, the point is not rendered.
85
-
| `pointRotation` | <code>number|number[]</code> | The rotation of the point in degrees.
86
-
| `pointStyle` | <code>string|string[]|Image|Image[]</code> | Style of the point. [more...](#pointstyle)
87
-
| `pointHitRadius` | <code>number|number[]</code> | The pixel size of the non-displayed point that reacts to mouse events.
88
-
| `pointHoverBackgroundColor` | <code>Color|Color[]</code> | Point background color when hovered.
89
-
| `pointHoverBorderColor` | <code>Color|Color[]</code> | Point border color when hovered.
90
-
| `pointHoverBorderWidth` | <code>number|number[]</code> | Border width of point when hovered.
91
-
| `pointHoverRadius` | <code>number|number[]</code> | The radius of the point when hovered.
92
-
93
-
### pointStyle
94
-
The style of point. Options are:
95
-
*`'circle'`
96
-
*`'cross'`
97
-
*`'crossRot'`
98
-
*`'dash'.`
99
-
*`'line'`
100
-
*`'rect'`
101
-
*`'rectRounded'`
102
-
*`'rectRot'`
103
-
*`'star'`
104
-
*`'triangle'`
105
-
106
-
If the option is an image, that image is drawn on the canvas using [drawImage](https://developer.mozilla.org/en/docs/Web/API/CanvasRenderingContext2D/drawImage).
67
+
| Name | Type | [Scriptable](../general/options.md#scriptable-options) | [Indexable](../general/options.md#indexable-options) | Default
| `label` | The label for the dataset which appears in the legend and tooltips.
96
+
97
+
### Point Styling
98
+
99
+
The style of each point can be controlled with the following properties:
100
+
101
+
| Name | Description
102
+
| ---- | ----
103
+
| `pointBackgroundColor` | The fill color for points.
104
+
| `pointBorderColor` | The border color for points.
105
+
| `pointBorderWidth` | The width of the point border in pixels.
106
+
| `pointHitRadius` | The pixel size of the non-displayed point that reacts to mouse events.
107
+
| `pointRadius` | The radius of the point shape. If set to 0, the point is not rendered.
108
+
| `pointRotation` | The rotation of the point in degrees.
109
+
| `pointStyle` | Style of the point. [more...](../configuration/elements#point-styles)
110
+
111
+
All these values, if `undefined`, fallback first to the dataset options then to the associated [`elements.point.*`](../configuration/elements.md#point-configuration) options.
112
+
113
+
### Line Styling
114
+
115
+
The style of the line can be controlled with the following properties:
116
+
117
+
| Name | Description
118
+
| ---- | ----
119
+
| `backgroundColor` | The line fill color.
120
+
| `borderCapStyle` | Cap style of the line. See [MDN](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/lineCap).
121
+
| `borderColor` | The line color.
122
+
| `borderDash` | Length and spacing of dashes. See [MDN](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/setLineDash).
123
+
| `borderDashOffset` | Offset for line dashes. See [MDN](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/lineDashOffset).
124
+
| `borderJoinStyle` | Line joint style. See [MDN](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/lineJoin).
125
+
| `borderWidth` | The line width (in pixels).
126
+
| `fill` | How to fill the area under the line. See [area charts](area.md).
127
+
| `lineTension` | Bezier curve tension of the line. Set to 0 to draw straightlines.
128
+
129
+
All these values, if `undefined`, fallback to the associated [`elements.line.*`](../configuration/elements.md#line-configuration) options.
130
+
131
+
### Interactions
132
+
133
+
The interaction with each point can be controlled with the following properties:
134
+
135
+
| Name | Description
136
+
| ---- | -----------
137
+
| `pointHoverBackgroundColor` | Point background color when hovered.
138
+
| `pointHoverBorderColor` | Point border color when hovered.
139
+
| `pointHoverBorderWidth` | Border width of point when hovered.
140
+
| `pointHoverRadius` | The radius of the point when hovered.
107
141
108
142
## Configuration Options
109
143
@@ -128,7 +162,7 @@ It is common to want to apply a configuration setting to all created radar chart
128
162
129
163
## Data Structure
130
164
131
-
The `data` property of a dataset for a radar chart is specified as an array of numbers. Each point in the data array corresponds to the label at the same index on the x axis.
165
+
The `data` property of a dataset for a radar chart is specified as an array of numbers. Each point in the data array corresponds to the label at the same index.
0 commit comments