Skip to content

Chart element

A chart of a dataset’s rows, drawn as vector graphics. Like a table, it reads its own dataset (with filter and sort, and Parent.X for the enclosing row). Rows are grouped into categories by the text of category, in the order they first appear, and each series’ value is aggregated per category. It is a Figure for screen readers, described by alt.

- { type: chart, dataset: ..., category: ..., series: ... }
chart.report.yaml
title: Sales by month
culture: en-US
data:
sales: { fields: { Month: date, Region: string, Revenue: decimal } }
body:
reportHeader:
- content:
- type: chart
kind: column
dataset: sales
category: "{Month:MMM}"
seriesBy: Region
series: [{ value: =Revenue }]
title: Revenue by month and region
alt: Revenue by month for the North and South regions, from January to April.
format: C0
width: 70%
height: 180pt
chart.data.yaml
data:
sales:
- { Month: 2026-01-01, Region: North, Revenue: 42000 }
- { Month: 2026-01-01, Region: South, Revenue: 31000 }
- { Month: 2026-02-01, Region: North, Revenue: 45500 }
- { Month: 2026-02-01, Region: South, Revenue: 36800 }
- { Month: 2026-03-01, Region: North, Revenue: 51200 }
- { Month: 2026-03-01, Region: South, Revenue: 40100 }
- { Month: 2026-04-01, Region: North, Revenue: 49800 }
- { Month: 2026-04-01, Region: South, Revenue: 44300 }
The chart example, rendered by Tagua.

Type: keyword · Default: column

The kind of chart.

One of:

  • column: Vertical bars.
  • bar: Horizontal bars.
  • line
  • area
  • pie
  • doughnut: A pie with a hole in the middle.

Type: text · Required

The dataset whose rows are charted.

Type: expression

Keeps only the rows for which this is true; Parent.X reads the enclosing row.

Type: list of sort key

Row order, which is also the order of the categories.

Type: text · Required

Text template: each row’s category (a column, a point on the line, a slice of the pie).

Type: list of object · Required

The values to plot: one series, or several side by side or stacked.

Type: expression

Splits the rows into a series per value of this expression, all with the one series’ value.

Type: true or false · Default: false

Stacks the series of a column, bar or area chart instead of setting them side by side.

Type: text

Text template shown above the chart.

Type: text

What the chart shows, for screen readers (text template). Required under PDF/UA unless an artifact.

Type: keyword · Default: auto

Where the legend goes.

One of:

  • auto: At the bottom when there are several series, and on a pie or doughnut.
  • bottom
  • right
  • none

Type: true or false

Writes each value on its column, point or slice (percentages on a pie). Default: on for pies only.

Type: text

.NET format for the values on the axis and in labels, e.g. N0 or C0.

Each entry of series.

Type: text

Shown in the legend. Defaults to “Series 1”, “Series 2”…

Type: expression · Required

A number per row, aggregated per category.

Type: keyword · Default: sum

How the values of a category’s rows are combined.

One of:

  • sum
  • avg
  • count
  • min
  • max

Type: color

Defaults to the next color of a palette that color-blind readers can tell apart.

It also has the properties of every element and the style properties.