Chart card

A signage-grade chart: columns, bars, lines, areas or a donut, with big direct labels and few gridlines.

Category: Operations. Tags: Charts and gauges, Numbers and metrics, Offices and workplaces.

Previews

Chart
Canvas
Chart
Corner
Chart
Chip

Views and forms

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

Card views, themes and publishing. Browse the gallery.

Data and privacy

This card uses its configured properties and live card data.

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""maxLength: 60
subtitlestring""maxLength: 80
kindstring"column""column", "bar", "line", "area", "donut"column: vertical bars; bar: horizontal bars; donut uses the first series.
prefixstring""maxLength: 3Before every value, for example $.
unitstring""maxLength: 6After every value, for example % or k.
decimalsinteger0minimum: 0; maximum: 4
stackedbooleanfalseStack the series (column and bar).
showValuesbooleantrue
targetLabelstring"Target"maxLength: 24

Dynamic properties

NameTypeDefaultValues and limitsDescription
seriesarrayminItems: 1; maxItems: 4; Required
series[].namestring""maxLength: 32
series[].valuesarrayminItems: 1; maxItems: 31; Required
labelsarray[]maxItems: 31Category labels, one per value.
targetnumber, nullnullA horizontal target line.

Canvas example

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

{
  "id": "chart",
  "primitive": "card",
  "card": "chart",
  "major": 1,
  "params": {
    "theme": "neomustard"
  },
  "rect": {
    "x": 0,
    "y": 0,
    "width": 1920,
    "height": 1080
  },
  "layer": 0,
  "content_fit": "fill",
  "data": "chart-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/chart-main" \
  --header "Authorization: Bearer $SCREENRIG_TOKEN" \
  --header "ScreenRig-Project: $SCREENRIG_PROJECT" \
  --header "Content-Type: application/json" \
  --data '{"document":{"series":[{"values":[1]}],"labels":[],"target":null}}'