GameScoreHistogram

Open in new tab

Attributes

buckets .buckets
number Defaults to 80.

Methods

.resultCallback(shell)
.define(tag, registry)
.subscribe(context, callback)

Events

pending-task PendingTaskEvent
Wraps the histogram data fetch for loading coordination

Shadow DOM Parts

PartDescription
labelThe top row showing player count and percentile
barsThe bar chart container
axisThe bottom "Better / Worse" labels

Displays a bar chart of the full score distribution from the score service, with a "You" marker at the player's score and a "Top N%" label.

Attributes

buckets .buckets
long -- Number of histogram buckets to request from the score API. More buckets = finer resolution. Defaults to 80.

CSS Custom Properties

Property Default Description
--game-accent #3b82f6 Colour of the "You" bar and label

Usage

<game-score-histogram></game-score-histogram>

<!-- Fewer buckets for a compact chart -->
<game-score-histogram buckets="20"></game-score-histogram>