Datasets Style
datasets
datasets 設定上,主要是label 、線色、線寬、fill等設定。
Dataset Configuration
Name | Type | Description |
|
| The label for the dataset which appears in the legend and tooltips. |
|
| How to clip relative to chartArea. Positive value allows overflow, negative value clips that many pixels inside chartArea. 0 = clip at chartArea. Clipping can also be configured per side: clip: {left: 5, top: false, right: -2, bottom: 0} |
|
| The drawing order of dataset. Also affects order for stacking, tooltip and legend. |
|
| The ID of the group to which this dataset belongs to (when stacked, each group will be a separate stack). Defaults to dataset |
|
| How to parse the dataset. The parsing can be disabled by specifying parsing: false at chart options or dataset. If parsing is disabled, data must be sorted and in the formats the associated chart type and scales use internally. |
|
| Configure the visibility of the dataset. Using |
Elements
Point Configuration
Point elements are used to represent the points in a line, radar or bubble chart.
Namespace: options.elements.point
, global point options: Chart.defaults.elements.point
.
Name | Type | Default | Description |
|
|
| Point radius. |
|
| Point style. | |
|
|
| Point rotation (in degrees). |
|
| Point fill color. | |
|
|
| Point stroke width. |
|
| Point stroke color. | |
|
|
| Extra radius added to point radius for hit detection. |
|
|
| Point radius when hovered. |
|
|
| Stroke width when hovered. |
#Point Styles
The following values are supported:
'circle'
'cross'
'crossRot'
'dash'
'line'
'rect'
'rectRounded'
'rectRot'
'star'
'triangle'
If the value is an image, that image is drawn on the canvas using drawImage .
#Line Configuration
Line elements are used to represent the line in a line chart.
Namespace: options.elements.line
, global line options: Chart.defaults.elements.line
.
Name | Type | Default | Description |
|
|
| Bézier curve tension ( |
|
| Line fill color. | |
|
|
| Line stroke width. |
|
| Line stroke color. | |
|
|
| Line cap style. See MDN. |
|
|
| Line dash. See MDN. |
|
|
| Line dash offset. See MDN. |
|
|
| Line join style. See MDN. |
|
|
|
|
|
|
| Interpolation mode to apply. See more... |
|
|
| How to fill the area under the line. See area charts. |
|
|
|
|
#Bar Configuration
Bar elements are used to represent the bars in a bar chart.
Namespace: options.elements.bar
, global bar options: Chart.defaults.elements.bar
.
Name | Type | Default | Description |
|
| Bar fill color. | |
|
|
| Bar stroke width. |
|
| Bar stroke color. | |
|
|
| Skipped (excluded) border: |
|
|
| The bar border radius (in pixels). |
|
| Style of the point for legend. |
#Arc Configuration
Arcs are used in the polar area, doughnut and pie charts.
Namespace: options.elements.arc
, global arc options: Chart.defaults.elements.arc
.
Last updated