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
Query requirements
Section titled “Query requirements”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
| platform | count |
|---|---|
| steam | 4 210 |
| android | 1 870 |
| ios | 943 |
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
Percentage bar chart
Section titled “Percentage bar chart”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 format → percent, Unit → %.
Common examples
Section titled “Common examples”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