Line chart
The line chart widget plots data over time. It supports both a single line and multiple series (lines) on the same chart, making it ideal for comparing trends across categories.
Use it for:
- Daily / weekly / monthly active users
- Event volume over time
- Revenue trends
- Comparing versions, platforms, or cohorts over time
Single-line chart
Section titled “Single-line chart”Return one row per time point with a time column and a value column.
Select
toDate(timestamp) AS date,uniqExact(identity) AS countFilters
WHERE name = 'app_started'GROUP BY dateORDER BY dateSELECT toDate(timestamp) AS date, uniqExact(identity) AS countFROM {table}WHERE name = 'app_started'GROUP BY dateORDER BY dateThe date column becomes the X axis. The count column is plotted as the single line.
Multi-line chart
Section titled “Multi-line chart”To render multiple lines on the same chart, return one row per time point with one column per series. Each series column becomes a separate line and its column name appears in the legend.
Select
toDate(timestamp) AS date,uniqExactIf(identity, platform = 'steam') AS "Steam",uniqExactIf(identity, platform = 'ios') AS "iOS",uniqExactIf(identity, platform = 'android') AS "Android"Filters
WHERE name = 'app_started'GROUP BY dateORDER BY dateResult shape:
| date | Steam | iOS | Android |
|---|---|---|---|
| 2026-04-01 | 120 | 85 | 43 |
| 2026-04-02 | 134 | 91 | 38 |
Comparing app versions over time
Section titled “Comparing app versions over time”Select
toDate(timestamp) AS date,uniqExactIf(session_id, app_version = '1.7.9') AS "v1.7.9",uniqExactIf(session_id, app_version = '1.7.8') AS "v1.7.8"Filters
WHERE name = 'app_started'GROUP BY dateORDER BY dateTime granularity
Section titled “Time granularity”Adjust the time grouping to match the time range you are displaying.
| Granularity | Function |
|---|---|
| Per minute | toStartOfMinute(timestamp) |
| Per hour | toStartOfHour(timestamp) |
| Per day | toDate(timestamp) |
| Per week | toStartOfWeek(timestamp) |
| Per month | toStartOfMonth(timestamp) |
Common examples
Section titled “Common examples”Daily active users
Select: toDate(timestamp) AS date, uniqExact(identity) AS count
Filters: WHERE name = 'app_started' GROUP BY date ORDER BY date
Sessions per day by platform
Select:
toDate(timestamp) AS date,uniqExactIf(session_id, platform = 'steam') AS "Steam",uniqExactIf(session_id, platform = 'android') AS "Android",uniqExactIf(session_id, platform = 'ios') AS "iOS"Filters: WHERE name = 'app_started' GROUP BY date ORDER BY date
Event count per hour
Select: toStartOfHour(timestamp) AS hour, count() AS count
Filters: WHERE name = 'app_started' GROUP BY hour ORDER BY hour