Table Header Format

Table header defines how the incoming data is interpreted and laid out in the table. Header is defined with a simple JSON array containing description of columns.

[
    {
        "id": "<source data field>",
        "text": "<name of the column>",
        "width": <optional: fixed width in pixels>,
        "alignment": "<optional: alignment within the column: left|right>"
    },
    <any number of additional descriptors>
]

For example, consider the following configuration:

[
    { "id": "index", "text": "#", "width": 30 },
    { "id": "key", "text": "Key", "width": 80 },
    { "id": "text", "text": "Summary", "alignment": "left" },
    { "id": "points", "text": "SP", "width": 60 },
    { "id": "labels", "text": "Label", "width": 80 }
]

When provided with this data:

[
  {
    "index": 1,
    "key": "DMC-39",
    "labels": "primary",
    "points": 1,
    "text": "Correct Blue Component"
  },
  {
    "index": 2,
    "key": "DMC-38",
    "labels": "secondary",
    "points": 2,
    "text": "Correct Blue Feature"
  },
  ...
]

It will produce:

Header Example