Table (from Box)

A stylized table of text elements.

Options

  • Inherits all from Box.
  • rows/data - Array of array of strings representing rows.
  • pad - Spaces to attempt to pad on the sides of each cell. 2 by default: one space on each side (only useful if the width is shrunken).
  • noCellBorders - Do not draw inner cells.
  • fillCellBorders - Fill cell borders with the adjacent background color.
  • style.header - Header style.
  • style.cell - Cell style.

Properties

  • Inherits all from Box.

Events

  • Inherits all from Box.

Methods

  • Inherits all from Box.
  • setRows/setData(rows) - Set rows in table. Array of arrays of strings.

    table.setData([
        [ 'Animals',  'Foods'  ],
        [ 'Elephant', 'Apple'  ],
        [ 'Bird',     'Orange' ]
    ]);
    

Last update: February 22, 2020