:::chart directive. Charts are rendered as images in the exported document.
Basic syntax
- A
typeattribute labels:line (except scatter/bubble charts)- One or more
dataset:lines
Chart types
Bar chart
Line chart
Pie chart
Pie, doughnut, and polar area charts automatically assign colors from a built-in palette if no colors are specified.
Doughnut chart
Radar chart
Polar area chart
Multiple datasets
Add multipledataset: lines to compare data series:
Dataset syntax
Multiple colors per dataset
For pie/doughnut charts, provide comma-separated colors:Simple data syntax
For single-dataset charts, usedata: instead of dataset::
Scatter charts
Scatter charts use coordinate pairs instead of simple values. Labels are not needed.Using dataset syntax
Using series + point syntax
An alternative syntax for scatter charts:series: starts a new dataset with a label and optional color. point: adds an x,y coordinate to the current series.
Bubble charts
Bubble charts extend scatter charts with a third value for the bubble radius:(x, y, radius).
Using series + point syntax:
Figure captions
Add acaption attribute for auto-numbering in the List of Figures:
"Figure", "Abb.") and styling (font, alignment, color) are configured in your document’s style settings. Charts share the same figure caption style as images.
Anchors for cross-references
Add ananchor attribute to reference the chart from elsewhere:
