Output Charts

Docs · Visuals

Progress list JSON format.

Several goals in one tile, each bar filled to its share of its own target.

Try it

Edit the example and the visual redraws. Mistakes show the same messages the API returns.

The visual
Progress list

Change any number or label. The chart follows.

Fields

The progress list document
FieldTypeRule
nameKeyRequiredstringThe key in each row that holds the goal's name. Up to 80 characters.
valueKeyRequiredstringThe key in each row that holds how much is done. Up to 80 characters. Must differ from nameKey.
maxKeyOptionalstringThe key in each row that holds that row's own target. Up to 80 characters. Must differ from nameKey and valueKey. Give maxKey or max, not both.
maxOptionalnumberOne target for every row, a number greater than 0. Give max or maxKey, not both.
formatOptionalstringnumber (the default), compact or percent. Applies to the value and the target; a percent value is a fraction: 0.25 shows as 25%.
prefixOptionalstringShown before the value and the target, such as "$". Up to 80 characters.
suffixOptionalstringShown after the value and the target, such as " h". Up to 80 characters.
rulesOptionalarray1 to 6 items, each { "below": n, "status": … } or { "atLeast": n, "status": … }, with status good, warn or bad; the first match wins. They are judged on the share done, the value divided by the target, so 1 means the target is met. For example, "rules": [{ "below": 0.5, "status": "bad" }, { "atLeast": 0.9, "status": "good" }].
dataRequiredarrayUp to 20 rows, drawn in the order you list them; may be empty.
Each row in data
FieldTypeRule
<nameKey>RequiredstringThe goal's name. Up to 80 characters. Names must be unique.
<valueKey>RequirednumberHow much is done, 0 or more.
<maxKey>OptionalnumberRequired when maxKey is set. The row's target, a number greater than 0.

Good to know

  • The bar is filled to value divided by target, capped at full. Past the target the bar stays full and the figures show the real numbers.
  • A row that matches a rule shows that status's shape and its bar takes the status colour; any other bar uses the scheme's first series colour. Rules are judged on the share done, not on the value.
  • Append merges rows by name, so one project's script can send only its own row. An append that would make more than 20 rows is refused; replace the whole list with PUT /v1/visuals/{id}/data instead.

Example

{
  "nameKey": "project",
  "valueKey": "done",
  "maxKey": "total",
  "format": "number",
  "rules": [
    { "below": 0.5, "status": "bad" },
    { "below": 0.9, "status": "warn" },
    { "atLeast": 0.9, "status": "good" }
  ],
  "data": [
    { "project": "Website", "done": 34, "total": 40 },
    { "project": "Mobile app", "done": 12, "total": 30 },
    { "project": "Docs", "done": 22, "total": 20 }
  ]
}

Send it from your code

Paste the document in the editor, or replace it with a PUT to the visual's push URL. The push API page has the details and examples.

Next: Status grid JSON format