# 图表

通过 `Vtiful\Kernel\Chart` 构造图表对象，调用 `series()` / `categories()` 注入数据后插入工作表。

> 请先把 `Chart` 实例赋值给变量，再调用工作簿的 `output()`。如果直接链式调用 `(new Chart())->series()->toResource()`，会触发重复插入告警。

本节内容：

* [图表类型常量](/zhong-wen-jian-ti/chart/chart-type-constants.md)
* [填充数据](/zhong-wen-jian-ti/chart/data-input.md)
* 示例：[圆环图](/zhong-wen-jian-ti/chart/doughnut.md)、[面积图](/zhong-wen-jian-ti/chart/area.md)、[直方图](/zhong-wen-jian-ti/chart/histogram.md)、[条形图](/zhong-wen-jian-ti/chart/bar.md)


---

# Agent Instructions: 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:

```
GET https://xlswriter-docs.viest.me/zhong-wen-jian-ti/chart.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
