Skip to content

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

Return one row per time point with a time column and a value column.

Select

toDate(timestamp) AS date,
uniqExact(identity) AS count

Filters

WHERE name = 'app_started'
GROUP BY date
ORDER BY date

The date column becomes the X axis. The count column is plotted as the single line.


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 date
ORDER BY date

Result shape:

dateSteamiOSAndroid
2026-04-011208543
2026-04-021349138

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 date
ORDER BY date

Adjust the time grouping to match the time range you are displaying.

GranularityFunction
Per minutetoStartOfMinute(timestamp)
Per hourtoStartOfHour(timestamp)
Per daytoDate(timestamp)
Per weektoStartOfWeek(timestamp)
Per monthtoStartOfMonth(timestamp)

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