Examples

Props API

query
LeaderboardQueryProps
Leaderboard query props
variant
LeaderboardChartVariant
The variant the chart will respond to, can be either bar or table
headers
string[]
If passed along with rows the component will ignore the built-in GraphQL operations
rows
string[][]
If passed along with headers the component will ignore the built-in GraphQL operations
loading
boolean
When true, shows a skeleton loader
timeZone
string
Time zone to use (for example, “America/Los_Angeles”, “Europe/Berlin”, or “UTC”). Defaults to the client’s local time zone
tableProps
LeaderboardTableProps
Optional props that are used to configure the table component.
chartProps
LeaderboardChartProps
Optional props that are used to configure the chart component. Only used when variant is “bar”.
accentColors
(AccentColors | string)[]
A list of accent colors the Leaderboard component will use, those will be picked in order
chartConfigProps
(config: ChartConfiguration<"bar">) => ChartConfiguration<"bar">
An optional prop that provides access to the Chart.js API, allowing for further customization of chart settings.
prettifyHeaders
boolean
Whether the headers should be prettified