StyleCode Property: columnWidth

columnWidth

Specifies a multiplicative factor for the width of a column in a table. Applies both to non-editable tables and editable tables in the tile grid.

Applies to Type Default
table > column Number 1

Examples

// Example: table > column
table Orders = with
  [| as Date, as Quantity |]
  [| date(2023,02,21), 150 |]
  [| date(2023,02,22), 250 |]

show table "My Table" a1c4 with
  Orders.Date { columnWidth: 2 }
  Orders.Quantity

Details

Weights must be ≥ 0. Each column occupy a fraction of the total width of the table equal to the ratio of its weight to the sum of all weights. By default, all weights are 1 and so the columns have equal widths.

For tables that are not zoomed in, a tile with width W displays a total of 2*W - 1 units of width, rounded up (so with W=2 the tile would display three width units: three columns with columnWidth=1, six columns with columnWidth=0.5 or two columns with columnWidth=2).

User Contributed Notes
0 notes + add a note