Line chart
Configure a line chart in Toucan AI to visualize trends and evolutions over time or categories.
Target Audience: Non-technical users and builders configuring charts in the Library.

Overview
A line chart shows how a measure evolves along a dimension on the horizontal axis.
- Dimension (X-Axis): one column — often a date, or categories such as region or product.
- Measure (Line Y-Axis): one column from your query, with an optional Aggregation (Sum, Count rows, etc.). Usually a numeric metric; counts (Count rows, Count distinct) work on any column type.
You can split the chart into several lines with Categorize by line (one line per category value). In the Library, enable Manual Edit, set Type to Line, and map columns from your query under Data.
Shared fields (Title, Narrative, Data) are documented in Chart types.
When to use it
Good fit
- Show a trend over time (revenue by month, headcount by year).
- Compare a few series on the same timeline (e.g. two or three regions).
- Track a KPI that changes across ordered categories (quarters, stages).
Prefer another chart
- Side-by-side category comparison or ranking → Bar chart.
- Part-to-whole → Stacked bar chart or Circular chart.
- A single KPI number → Value.
Examples: revenue over time, headcount by department on a shared timeline, events counted per month.
With Categorize by line, keep few categories (about three lines or fewer) so the chart stays readable.
Common setups
- Time series: date on X-Axis + Date granularity + Line Y-Axis with aggregation.
- Multi-line: same as above + Categorize by line (e.g. region).
- Counts over time: date on X-Axis + Count rows or Count distinct on Line Y-Axis.
Configuration options
Open the chart in the Library, turn on Manual Edit, select Data (database + query), then set Type to Line. Options match the editor panels Dimension and Measure; advanced fields are under More dimension options and More measure options.
Prerequisites: connected database, Manual Edit enabled (how-to).
Dimension
| Option | How it works |
|---|---|
| X-Axis | Horizontal axis (date, product, region, etc.). |
| Date granularity | When X-Axis is a date: Year, Quarter, Month, Week, or Day. |
| Date format | How date labels appear on the axis. |
| Order data | More dimension options. Sort by a column, ascending or descending. |
| Categorize by line | More dimension options. One line per distinct value in the column. |
| Show all labels | More dimension options. Label under each X point; when off, labels may be thinned to avoid overlap. |
Measure
| Option | How it works |
|---|---|
| Line Y-Axis | Column plotted on the vertical axis. Often numeric; use Aggregation (e.g. Count rows) for non-numeric columns. |
| Aggregation | Reduces rows before plotting. |
| Format number | Shown when the measure is numeric (after aggregation). Style (Standard, Percent, Currency), decimals, optional Unit. |
| Show value on line | More measure options. Values above each point. |
| Automatic y-axis scaling | More measure options. On by default; off to set Min / Max. |
| Exclude 0 values | More measure options. Removes rows where the measure is 0, null, or empty (same as the UI label). |
Aggregations on Line Y-Axis
| Aggregation | Typical column types |
|---|---|
| Sum, Cumulated sum, Average | Integer, float |
| Minimum, Maximum | Integer, float, date |
| Count rows, Count distinct | All types |
| Standard deviation | Integer, float |
The AI assistant can pre-fill these fields when you create a chart with AI; use Manual Edit to adjust them.