Attendance card

Today's attendance by class as rings, with the whole school together, classes at or above the goal marked, and positive streaks. Counts only, never names.

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

Previews

Attendance
Canvas
Attendance
Corner
Attendance
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.

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

NameTypeDefaultValues and limitsDescription
goalinteger95minimum: 1; maximum: 100The attendance percentage a class or the school reaches to count as on track.
showDatebooleantrue
hour12booleanfalse
timeZonestring, nullnull

Dynamic properties

NameTypeDefaultValues and limitsDescription
titlestring"Attendance today"maxLength: 40
classesarray[]minItems: 0; maxItems: 16Today'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[].namestringminLength: 1; maxLength: 28; Required
classes[].enrolledintegerminimum: 1; maximum: 9999; Required
classes[].presentintegerminimum: 0; maximum: 9999Here today. Absent: the class has not reported yet.
classes[].streakinteger0minimum: 0; maximum: 999Days in a row at or above the goal.
schoolStreakinteger0minimum: 0; maximum: 999Days in a row the whole school was at or above the goal.
takenAtstring""maxLength: 40ISO 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":""}}'