Chart card

Columns, bars, lines, areas or a donut with one hero figure, few gridlines and direct labels.

Columns, bars, lines, areas or a donut are built for distance, with one hero figure, few gridlines and direct labels. It fills the whole screen, sits in a box in the middle, tucks into a corner as a small square, runs as one line in a corner or stretches as a band along an edge. You choose columns, bars, a line, an area or a donut, whether the series stack, the hero as the latest value, the total of the first series or its peak, a horizontal target line, and which direction of change is good.

Live card

This card is drawn in your browser by the same code the Players run, with sample data.

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

Data and privacy

This card uses its configured properties and live card data.

Properties

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

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
heroValuestring"auto""auto", "latest", "total", "max", "none"The hero figure: the latest value (a stack's last total), the total of the first series, its peak, or none. auto is the latest value, and the total for horizontal bars, whose categories are not a sequence. A donut's is its total (its largest share when the values are percentages).
showChangebooleantrueShow the change of the latest value against the point before it.
goodWhenstring"up""up", "down"Which direction of change is good (down for costs and wait times).

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.
changedAtstring, nullnullISO 8601 instant the latest point arrived. From that instant the hero counts from the figure before it to the new one, on every screen together.

Example params

{
  "theme": "neomustard"
}
screenrig card create --type chart --major 1 --file params.json

Example data

{
  "series": [
    {
      "values": [
        1
      ]
    }
  ],
  "labels": [],
  "target": null,
  "changedAt": null
}

Layouts

This core card fits every layout: full screen, center, wide, corner, chip, strip, or any free rectangle.

Layouts: full, center, wide, corner, chip, strip. Forms: landscape, portrait, square, strip.

Use this card

Add this card to a playlist as in Publish a card canvas, place it with the layouts and anchors and update its data as in Write live values.