Turn a report into a chart
Any report can render as a chart by ending its query with RENDER <kind> and
configuring it with WITH (...). A query with no RENDER clause renders as a
table.

Pick a kind that suits the shape of your data
Section titled “Pick a kind that suits the shape of your data”- Ranking a handful of things →
bar_chart, orleaderboardfor text with mentions. - Change over time →
line_chartorarea_chart, grouped byday,week, ormonth. - Parts of a whole →
donut_chart, and only when rows are few and actually sum to something meaningful. - Two dimensions at once →
heatmap, grouped by two dimensions. - Comparing two numbers per row →
scatter_chart. - One headline number →
kpi_cardwithGROUP BY all. - Comparing several normalized metrics →
radar_chart, three to eight of them.
All twelve are listed in Render kinds and options.
Map columns to the chart
Section titled “Map columns to the chart”WITH (...) binds your query’s outputs to chart channels:
select games, win_ratefrom match_participantsgroup by championorder by games desclimit 10render bar_chart with (y = games, orientation = horizontal)yis the numeric series — up to eight of them, asy = (a, b).xis the horizontal channel; it defaults to the grouping column.valueis the cell value for a heatmap or a KPI card.sizesizes scatter points.
A chart that renders empty or wrong is nearly always a y bound to something
the query does not actually output — check that the name in WITH appears in
the SELECT.
Chart a trend
Section titled “Chart a trend”Group by a time dimension rather than a player or champion:
select games, win_ratefrom match_participantswhere queue in (solo, flex)group by weekorder by week ascrender line_chart with (y = win_rate, x_axis = "Week", smooth = true)Note order by week asc — time charts read wrong when sorted by value, which is
the default.
Chart two dimensions
Section titled “Chart two dimensions”A heatmap needs two grouping dimensions and a value:
select gamesfrom match_participantsgroup by champion, team_positionorder by games descrender heatmap with (value = games, series = team_position)Show one number
Section titled “Show one number”select games, win_rate, kdafrom match_participantswhere queue in (solo)group by allrender kpi_cardGROUP BY all collapses everything to a single row, which is what a KPI card
displays.
Style it
Section titled “Style it”render bar_chart with ( y = win_rate, title = "Ranked win rate", subtitle = "Last 30 days", y_axis = "Win rate", theme = lol_dark, palette = ranked, labels = percent, legend = none)theme—lol_dark,lol_light,minimal_dark,minimal_light.palette—ranked,categorical,team,gold,colorblind. Usecolorblindfor anything the whole server reads.colors = (#rrggbb, …)— up to eight custom colors, contrast-corrected for the theme.labels—auto,show,hide,value,percent.sort— reorders the chart visually without changing the query’s rows.
Keep charts readable
Section titled “Keep charts readable”Reports return at most 25 rows, and far fewer is usually better: a bar chart
with 25 categories is unreadable in a Discord message. Set an explicit LIMIT
of about 10 and let ORDER BY decide what matters.