LineChart

Trends over a continuous or time axis. Add series to draw one line per group.

<LineChart data={by_channel} x="month" y="downloads" series="channel"
           title="Downloads by channel" format="number" />

Without series you get a single line:

Add stacked (with a series) for a stacked-area chart:

Or pass a comma-separated y for one line per metric column (no series needed):

From the semantic layer #

Like every chart, LineChart also takes semantic metric refs instead of data={query} — and a date by buckets on demand with grain=:

<LineChart metric={sales.revenue} by={sales.order_date} grain="month" />

series={model.dim} splits one metric into a line per value; a comma-separated metric= draws one line per measure.

Attributes #

Attribute Purpose
data Required. The query to plot (data={query}).
x Required. Column for the x-axis (category / time).
y Required. Column for the value (y-axis).
series Column to split into one line per group.
stacked With series, stack the lines into a cumulative area.
title Chart title.
sort_by Column to sort by before plotting.
color Single color or comma-separated palette override.
height Pixel height (default 300).
col-span Columns to span inside a <Grid>.
format · currency · decimals · locale · date_format Value & tooltip number/date formatting.
empty_message Message shown when the query returns no rows (default "No data available").

stacked pairs with series; the rest are the shared chart attributes — common to every chart type — see Charts.

Generated