House points card

The school houses as tall bars or a ladder of bars, ranked by points, with the leader crowned and the latest awards beside them.

Category: Schools. Tags: Schools and campuses, Leaderboards and standings, Charts and gauges, Recognition.

Previews

House points
Canvas
House points
Corner
House points
Chip

Views and forms

Views: canvas, corner, chip. Canvas forms: landscape, portrait, square, strip.

Card views, themes and publishing. Browse the gallery.

Data and privacy

This card uses its configured properties and live card data.

An award names a house, never a student.

Properties

For theme, background, accent and position, see Common properties.

Set static properties in params. Bind data to a project card data key for live values; that document holds only dynamic properties. Without a data key, put the complete configuration in params. Nested rows describe the contents of their parent property.

Static properties

NameTypeDefaultValues and limitsDescription
titlestring"House points"maxLength: 40
awardCountinteger5minimum: 1; maximum: 8How many recent awards the canvas lists.
hour12booleantrue

Dynamic properties

NameTypeDefaultValues and limitsDescription
housesarray[]minItems: 0; maxItems: 8The houses and their point totals. Rank, bar heights and the leader come from the totals.
houses[].namestringminLength: 1; maxLength: 24; Required
houses[].pointsintegerminimum: 0; maximum: 999999; Required
houses[].colorstringpattern: "^#[0-9A-Fa-f]{6}$"The house colour as #RRGGBB. Absent, the house takes a colour from the theme.
awardsarray[]minItems: 0; maxItems: 40Recent awards, newest first by time. An award names a house, never a student.
awards[].housestringminLength: 1; maxLength: 24; RequiredA house name from houses.
awards[].pointsintegerminimum: 1; maximum: 999; Required
awards[].reasonstring""maxLength: 80Why the points were given, for example Helping a new friend.
awards[].atstring""maxLength: 40ISO 8601 instant of the award.

Canvas example

Add this item to a playlist page’s primitives. Publish the playlist and assign a screen.

{
  "id": "house-points",
  "primitive": "card",
  "card": "house-points",
  "major": 1,
  "params": {
    "theme": "neomustard"
  },
  "rect": {
    "x": 0,
    "y": 0,
    "width": 1920,
    "height": 1080
  },
  "layer": 0,
  "content_fit": "fill",
  "data": "house-points-main"
}

Write live data

Create this document before showing the card, then replace it to update the screen without republishing. Use the same project as the playlist. Supply your API authorization through the environment; see API authentication.

curl --request PUT "https://api.screenrig.ai/api/card-data/house-points-main" \
  --header "Authorization: Bearer $SCREENRIG_TOKEN" \
  --header "ScreenRig-Project: $SCREENRIG_PROJECT" \
  --header "Content-Type: application/json" \
  --data '{"document":{"houses":[],"awards":[]}}'