> For the complete documentation index, see [llms.txt](https://information9527.gitbook.io/html/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://information9527.gitbook.io/html/qu-xian-tu/untitled/datasets.md).

# Datasets Style

## datasets&#x20;

datasets 設定上，主要是label 、線色、線寬、fill等設定。

### Dataset Configuration <a href="#dataset-configuration" id="dataset-configuration"></a>

| Name      | Type                | Description                                                                                                                                                                                                                                   |
| --------- | ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `label`   | `string`            | The label for the dataset which appears in the legend and tooltips.                                                                                                                                                                           |
| `clip`    | `number`\|`object`  | 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} |
| `order`   | `number`            | The drawing order of dataset. Also affects order for stacking, tooltip and legend.                                                                                                                                                            |
| `stack`   | `string`            | The ID of the group to which this dataset belongs to (when stacked, each group will be a separate stack). Defaults to dataset `type`.                                                                                                         |
| `parsing` | `boolean`\|`object` | 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.           |
| `hidden`  | `boolean`           | Configure the visibility of the dataset. Using `hidden: true` will hide the dataset from being rendered in the Chart.                                                                                                                         |

## Elements <a href="#elements" id="elements"></a>

### Point Configuration <a href="#point-configuration" id="point-configuration"></a>

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                                           |
| -------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ | -------------------------------- | ----------------------------------------------------- |
| `radius`                                                                                     | `number`                                                           | `3`                              | Point radius.                                         |
| [`pointStyle`](https://www.chartjs.org/docs/latest/configuration/elements.html#point-styles) | `string`\|`Image`                                                  | `'circle'`                       | Point style.                                          |
| `rotation`                                                                                   | `number`                                                           | `0`                              | Point rotation (in degrees).                          |
| `backgroundColor`                                                                            | [`Color`](https://www.chartjs.org/docs/latest/general/colors.html) | `Chart.defaults.backgroundColor` | Point fill color.                                     |
| `borderWidth`                                                                                | `number`                                                           | `1`                              | Point stroke width.                                   |
| `borderColor`                                                                                | [`Color`](https://www.chartjs.org/docs/latest/general/colors.html) | `'Chart.defaults.borderColor`    | Point stroke color.                                   |
| `hitRadius`                                                                                  | `number`                                                           | `1`                              | Extra radius added to point radius for hit detection. |
| `hoverRadius`                                                                                | `number`                                                           | `4`                              | Point radius when hovered.                            |
| `hoverBorderWidth`                                                                           | `number`                                                           | `1`                              | Stroke width when hovered.                            |

### [#](https://www.chartjs.org/docs/latest/configuration/elements.html#point-styles)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 ](https://developer.mozilla.org/en/docs/Web/API/CanvasRenderingContext2D/drawImage).

### [#](https://www.chartjs.org/docs/latest/configuration/elements.html#line-configuration)Line Configuration <a href="#line-configuration" id="line-configuration"></a>

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                                                                                                                 |
| ------------------------ | ------------------------------------------------------------------ | -------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| `tension`                | `number`                                                           | `0`                              | Bézier curve tension (`0` for no Bézier curves).                                                                            |
| `backgroundColor`        | [`Color`](https://www.chartjs.org/docs/latest/general/colors.html) | `Chart.defaults.backgroundColor` | Line fill color.                                                                                                            |
| `borderWidth`            | `number`                                                           | `3`                              | Line stroke width.                                                                                                          |
| `borderColor`            | [`Color`](https://www.chartjs.org/docs/latest/general/colors.html) | `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...](https://www.chartjs.org/docs/latest/charts/line.md/#cubicinterpolationmode)      |
| `fill`                   | `boolean`\|`string`                                                | `false`                          | How to fill the area under the line. See [area charts](https://www.chartjs.org/docs/latest/charts/area.html#filling-modes). |
| `stepped`                | `boolean`                                                          | `false`                          | `true` to show the line as a stepped line (`tension` will be ignored).                                                      |

### [#](https://www.chartjs.org/docs/latest/configuration/elements.html#bar-configuration)Bar Configuration <a href="#bar-configuration" id="bar-configuration"></a>

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                                                                                |
| -------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ | -------------------------------- | ------------------------------------------------------------------------------------------ |
| `backgroundColor`                                                                            | [`Color`](https://www.chartjs.org/docs/latest/general/colors.html) | `Chart.defaults.backgroundColor` | Bar fill color.                                                                            |
| `borderWidth`                                                                                | `number`                                                           | `0`                              | Bar stroke width.                                                                          |
| `borderColor`                                                                                | [`Color`](https://www.chartjs.org/docs/latest/general/colors.html) | `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`](https://www.chartjs.org/docs/latest/configuration/elements.html#point-styles) | `string`\|`Image`                                                  | `'circle'`                       | Style of the point for legend.                                                             |

### [#](https://www.chartjs.org/docs/latest/configuration/elements.html#arc-configuration)Arc Configuration <a href="#arc-configuration" id="arc-configuration"></a>

Arcs are used in the polar area, doughnut and pie charts.

Namespace: `options.elements.arc`, global arc options: `Chart.defaults.elements.arc`.

| Name                     | Type                                                               | Default                          | Description           |
| ------------------------ | ------------------------------------------------------------------ | -------------------------------- | --------------------- |
| `angle` - for polar only | `number`                                                           | `circumference / (arc count)`    | Arc angle to cover.   |
| `backgroundColor`        | [`Color`](https://www.chartjs.org/docs/latest/general/colors.html) | `Chart.defaults.backgroundColor` | Arc fill color.       |
| `borderAlign`            | `string`                                                           | `'center'`                       | Arc stroke alignment. |
| `borderColor`            | [`Color`](https://www.chartjs.org/docs/latest/general/colors.html) | `'#fff'`                         | Arc stroke color.     |
| `borderWidth`            | `number`                                                           | `2`                              |                       |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://information9527.gitbook.io/html/qu-xian-tu/untitled/datasets.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
