Category: Schools. Tags: Schools and campuses, Charts and gauges, Numbers and metrics.
Previews



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.
Counts only, never names.
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
| Name | Type | Default | Values and limits | Description |
|---|---|---|---|---|
goal | integer | 95 | minimum: 1; maximum: 100 | The attendance percentage a class or the school reaches to count as on track. |
showDate | boolean | true | ||
hour12 | boolean | false | ||
timeZone | string, null | null |
Dynamic properties
| Name | Type | Default | Values and limits | Description |
|---|---|---|---|---|
title | string | "Attendance today" | maxLength: 40 | |
classes | array | [] | minItems: 0; maxItems: 16 | Today's attendance by class: how many are here of how many are enrolled. A class that has not reported yet leaves present out. Counts only, never names. |
classes[].name | string | minLength: 1; maxLength: 28; Required | ||
classes[].enrolled | integer | minimum: 1; maximum: 9999; Required | ||
classes[].present | integer | minimum: 0; maximum: 9999 | Here today. Absent: the class has not reported yet. | |
classes[].streak | integer | 0 | minimum: 0; maximum: 999 | Days in a row at or above the goal. |
schoolStreak | integer | 0 | minimum: 0; maximum: 999 | Days in a row the whole school was at or above the goal. |
takenAt | string | "" | maxLength: 40 | ISO 8601 instant attendance was taken. Empty shows no time. |
Canvas example
Add this item to a playlist page’s primitives. Publish the playlist and assign a screen.
{
"id": "attendance",
"primitive": "card",
"card": "attendance",
"major": 1,
"params": {
"theme": "neomustard"
},
"rect": {
"x": 0,
"y": 0,
"width": 1920,
"height": 1080
},
"layer": 0,
"content_fit": "fill",
"data": "attendance-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/attendance-main" \
--header "Authorization: Bearer $SCREENRIG_TOKEN" \
--header "ScreenRig-Project: $SCREENRIG_PROJECT" \
--header "Content-Type: application/json" \
--data '{"document":{"title":"Attendance today","classes":[],"schoolStreak":0,"takenAt":""}}'