Skip to main content

Table

Table monitors are used to show data in the form of columns and rows.

The ctx objects method setTable receives an object with an array of arrays field called data like the following (where each array represents a row in the table):

{
rows: [
[
{
display: "Sales/Month",
},
{
display: "Jan",
},
{
display: "Feb",
},
...
],
[
{
display: "Phones",
},
{
display: utils.abbreviateNumber(1000),
value: 1000,
},
{
display: utils.abbreviateNumber(2000),
value: 2000,
showHorizontalChart: true,
showVerticalChart: true
},
...
],
...
]
}

Background Chart

Tables show a simple chart in the background of the rows if the rows had numbers and had showHorizontalChart or showVerticalChart set to true. Where showHorizontalChart shows a horizontal chart and showVerticalChart shows a vertical chart.

Note that display will determine what is shown in the table to the end-user, while value will determine the height/width of the chart bars.