> For the complete documentation index, see [llms.txt](https://docs.documentero.com/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.documentero.com/documentation/charts-and-diagrams.md).

# Charts & Diagrams

Using [Fields - HTML Support](/documentation/templates/fields-html-support.md) or [Fields - Mermaid Support](/documentation/templates/fields-mermaid-support.md) you can add simple and complex charts, diagrams and other elements based on data passed during document generation.

**Check Mermaid Tutorials & Syntax** -<https://mermaid.js.org/ecosystem/tutorials.html>

**Pie Chart**

```
pie title Pets adopted by volunteers
    "Dogs" : 386
    "Cats" : 85
    "Rats" : 15
```

<figure><img src="/files/gCsQM9bDqsFkBHcO8Rmu" alt="" width="375"><figcaption></figcaption></figure>

**Sequence Diagram Example**

```
sequenceDiagram
    Alice->>John: Hello John, how are you?
    John-->>Alice: Great!
    Alice-)John: See you later!
```

<figure><img src="/files/9PyeBkCmCllVFu5RzbOW" alt="" width="375"><figcaption></figcaption></figure>

#### Chart XY

```
---
config:
    xyChart:
        width: 900
        height: 600
    themeVariables:
        xyChart:
            titleColor: "#ff0000"
---
xychart-beta
    title "Sales Revenue"
    x-axis [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
    y-axis "Revenue (in $)" 4000 --> 11000
    bar [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000]
    line [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000]
```

<figure><img src="/files/Tkx1ykLohWRw1Z7SJJ0H" alt="" width="375"><figcaption></figcaption></figure>

**Check more examples on Mermaid official documentation site** -<https://mermaid.js.org/ecosystem/tutorials.html>


---

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

```
GET https://docs.documentero.com/documentation/charts-and-diagrams.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.
