# Diagrams

Diagram artifacts let you create visual diagrams directly in conversation using [Mermaid](https://mermaid.js.org/) syntax. Ask Darcy to create flowcharts, sequence diagrams, architecture diagrams, and more — the result renders as an interactive, editable diagram.

## Supported Diagram Types

| Type                    | Use Case                                     |
| ----------------------- | -------------------------------------------- |
| **Flowchart**           | Process flows, decision trees, workflows     |
| **Sequence Diagram**    | API interactions, system communication flows |
| **Class Diagram**       | Object models, data structures               |
| **State Diagram**       | State machines, lifecycle flows              |
| **Entity Relationship** | Database schemas, data models                |
| **Gantt Chart**         | Timelines, project schedules                 |
| **Pie Chart**           | Simple proportional breakdowns               |
| **Mind Map**            | Brainstorming, topic exploration             |
| **Timeline**            | Chronological events                         |
| **Git Graph**           | Branch and merge visualizations              |

## Creating Diagrams

Ask Darcy naturally:

* "Create a flowchart showing our deployment process"
* "Draw a sequence diagram for the checkout API flow"
* "Make an ER diagram for our user database schema"
* "Diagram the state machine for order processing"

## Editing

Click **Edit** to open the split-pane editor — Mermaid source code on the left, live diagram preview on the right. Changes to the code update the preview in real time.

You can also ask Darcy to modify diagrams in chat: "Add an error handling branch to that flowchart" or "Include the payment service in the sequence diagram."

## Eraser.io Integration

Diagrams can integrate with [Eraser.io](https://eraser.io) for enhanced rendering. When available, diagrams display using Eraser's polished visual style and include an **Open in Eraser.io** link in the download menu for further collaborative editing.

## Export Options

| Option                | Format                                 |
| --------------------- | -------------------------------------- |
| **Download as Image** | SVG                                    |
| **Download Mermaid**  | Raw `.mmd` source file                 |
| **Open in Eraser.io** | Collaborative editing (when available) |


---

# 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://docs.darcyiq.com/core-features/artifacts/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.
