Skip to content

Tables

Description

Display a Data Table

Attributes

  • tile: table
  • title:
  • connect: connection objects
    • ..standard fields..
    • hTotal: tuple with expression, title and format
    • vTotal: tuple with expression, title and format
  • table: configuration related to the table content formatting
    • timeSeries: time series expression for e.g YYYY-MM; MMM YYYY; P1M
    • groupBy: provide either $user or any key
    • groupByTransform: provide either system:countryIso or any key
    • title
    • firstCol:
    • export: Any valid Dispatch query
    • width: table header column width
    • users: users query
    • classes: Provide a classes for a table.For e.g cell class for table cell.
    • conditionalBackground: provide a background color based different condition [color]: match expression

Notes

  • at(ls, index) allows a lookup of specific location in the list with negative values counted from the end.

Example

"table": {
    "timeSeries": "YYYY-MM; MMM YYYY; P1M",
    "groupBy": "$user, project",
    "takeLast": 18,
    "firstCol": 260
},
"connect": [
    {
        ..
        "hTotal": [
            "(at(ls, -1) - mean(ls)) / std(ls)", "Z-Score", "0.0"],
        "vTotal": [
            "mean(ls)", "Mean", "0.0"]
    }
]}

Example1

{
  "tile": "table",
  "table": {
    "timeSeries": "YYYY-MM-DD; DD MMM; P1D",
    "conditionalBackground": "#000",
    "users": "current user",
    "export": "given trackers [wellness]",
    "groupBy": "$user"
  },
  "connect": [
    {
      "title": "Wellness test",
      "source": "wellness",
      "pick": 2,
      "apply": "at(ls, 4)",
      "hTotal": [
        "(at(ls, -1) - mean(ls)) / std(ls)",
        "Total Horizontal",
        "0.0"
      ],
      "vTotal": [
        "mean(ls)",
        "Total Vertical",
        "0.0"
      ]
    }
  ]
}

Example2

{
    "tile": "table",
    "table": {
      "timeSeries": "YYYY-MM-DD; MMM-D; P1D",
      "export": "given trackers [wellness]",
      "conditionalBackground": {
        "lightcyan, orangered": "n <= 0",
        "lightblue, dodgerblue": "n >= 1 and n < 4",
        "dodgerblue, white": "n >= 4"
      },
      "classes": {
        "cell": "text-center"
      }
    },
    "display": {
      "span": "12"
    },
    "connect": [
      {
        "title": "Wellness test",
        "source": "wellness",
        "pick": "1",
        "apply": "sum(ls)",
        "format": "0,0"
      }
    ]
}