Skip to main content
The XY chart is a comprehensive charting module that encompasses various types of charts utilizing both x-axis and y-axis for data representation. Currently, it includes bar charts and line charts.

Basic example

Syntax overview

Single-word text values don’t need quotes. Multi-word values with spaces must be enclosed in quotes.

Orientation

Charts can be horizontal or vertical (default):

Title

Add a title to your chart:

X-axis

The x-axis can be categorical or numeric: Categorical:
Numeric range:

Y-axis

The y-axis represents numerical range values: With range:
Auto-generated range:
Both axes are optional. If not provided, ranges will be auto-generated from data.

Line chart

Add a line to your chart:

Bar chart

Add bars to your chart:

Simple example

The minimal chart needs only the chart name and one data set:

Multiple data series

Combine multiple lines and bars in one chart:

Configuration

Theme variables

Customize chart colors using theme variables:

Custom colors

Set colors for lines and bars using plotColorPalette:

Complete example

Here’s a comprehensive example with configuration and theming:
Use horizontal orientation for charts with long category names to improve readability.