> ## Documentation Index
> Fetch the complete documentation index at: https://docs.arya.so/llms.txt
> Use this file to discover all available pages before exploring further.

# Chart builder

> Build custom charts from any workspace object.

The **chart builder** is where you build a single chart: choose source, metric, dimension, type, visual customisation.

<Frame>
  <img src="https://mintcdn.com/agevole/cM9eEPJE8FVhTNOb/images/report/en/chart-builder.svg?fit=max&auto=format&n=cM9eEPJE8FVhTNOb&q=85&s=6e9ca89489ce94865b27f7c2fd732caa" alt="Chart builder with source, metric, grouping selection and preview" width="1200" height="720" data-path="images/report/en/chart-builder.svg" />
</Frame>

## Chart anatomy

<Steps>
  <Step title="Data source">
    * **Object**: Deal, Company, Contact, Task, Invoice, Project, etc.
    * **List**: start from an existing [list](/en/lists/overview) (with filters applied)
    * **Multiple**: union or join of multiple sources (complex charts)
  </Step>

  <Step title="Filters">
    Narrow the data:

    * `value > 10000`
    * `stage in ("Proposal", "Negotiation")`
    * `created_at in last 90 days`
  </Step>

  <Step title="Metric">
    What you measure:

    * `count` (record count)
    * `sum(field)` (e.g. total deal value)
    * `avg(field)` (average)
    * `min` / `max`
    * `count_distinct` (unique)
    * Custom metrics (formula)
  </Step>

  <Step title="Group by (dimension)">
    One or more dimensions:

    * Categorical: `stage`, `owner`, `industry`
    * Date: `per day`, `per week`, `per month`, `per quarter`
    * Numeric: buckets (e.g. `deal value: 0-10k, 10-50k, 50-100k, 100k+`)
  </Step>

  <Step title="Chart type">
    Arya suggests the optimal type based on metric and dimension. Override if needed.
  </Step>

  <Step title="Visual customisation">
    Colours, labels, legend, background, value formatting (€, %, K/M).
  </Step>
</Steps>

## Practical examples

<AccordionGroup>
  <Accordion title="Monthly revenue last 12 months">
    Source: `Invoice` (filter: status = Paid, date in last 12 months).
    Metric: `sum(amount)`.
    Group: per month.
    Type: line chart.
  </Accordion>

  <Accordion title="Top 10 customers by revenue">
    Source: `Invoice`.
    Metric: `sum(amount)`.
    Group: per `company.name`.
    Sort: desc, top 10.
    Type: horizontal bar.
  </Accordion>

  <Accordion title="Pipeline conversion funnel">
    Source: `Deal`.
    Metric: `count`.
    Group: per `stage` (ordered).
    Type: funnel.
  </Accordion>

  <Accordion title="Overdue tasks per owner">
    Source: `Task` (filter: overdue=true).
    Metric: `count`.
    Group: per `assignee.name`.
    Type: bar chart, colour = priority.
  </Accordion>

  <Accordion title="Win rate per rep">
    Source: `Deal` (closed only).
    Custom metric: `count(won) / count(total) * 100`.
    Group: per `owner`.
    Type: bar with target.
  </Accordion>
</AccordionGroup>

## Custom metrics (formulas)

For metrics not covered by base aggregators, use formulas:

```
weighted_pipeline = sum(value * probability / 100)
conversion_rate = count_distinct(won_deals) / count_distinct(all_deals) * 100
avg_cycle_time = avg(closed_at - created_at)
```

Supports arithmetic operators, date functions, IF conditions.

## Period comparison

Every chart can show **comparison** with previous period:

* Vs previous period (MoM, YoY)
* Vs set target
* Vs historical average

Appears as overlay or second series.

## Save and reuse

A saved chart can be:

* Used in multiple dashboards
* Shared as "single chart" via link
* Exported (image, SVG, data)

## Frequently asked questions

<AccordionGroup>
  <Accordion title="Do charts refresh in real time?">Yes. You can enable cache if performance is a concern.</Accordion>
  <Accordion title="Can I combine multi-object data?">Yes, with **join** (e.g. deal + company to filter by industry). Mind performance on large datasets.</Accordion>
  <Accordion title="How do I handle timezones?">Arya uses workspace timezone for temporal aggregations. Configurable per chart if needed.</Accordion>
</AccordionGroup>
