Skip to content

Bar chart

The bar chart widget compares a numeric value across discrete categories. It renders one bar per row returned by your query.

Use it for:

  • Events or users per platform
  • Top N countries by session count
  • Revenue by product category
  • Event breakdown by app version

Return one row per category with a label column and a value column.

Select: platform, count() AS count
Filters: WHERE name = 'app_started' GROUP BY platform ORDER BY count DESC

platformcount
steam4 210
android1 870
ios943

Add LIMIT to the filters to restrict to the top N bars.

Select: country, uniqExact(identity) AS count
Filters: WHERE name = 'app_started' GROUP BY country ORDER BY count DESC LIMIT 10


To show each bar as a percentage of the total, set Display format to percent. Return raw counts — no SQL changes needed.

Select: platform, count() AS count
Filters: WHERE name = 'app_started' GROUP BY platform ORDER BY count DESC

Set Display formatpercent, Unit%.


Sessions by platform

Select: platform, uniqExact(session_id) AS count
Filters: WHERE name = 'app_started' GROUP BY platform ORDER BY count DESC


Events by app version

Select: app_version, count() AS count
Filters: GROUP BY app_version ORDER BY count DESC LIMIT 10


Top 10 countries by unique users

Select: country, uniqExact(identity) AS count
Filters: WHERE name = 'app_started' GROUP BY country ORDER BY count DESC LIMIT 10