Config
The Table Config type definition.
All options are optional. For options not provided, the default values are used.
The top level configuration of voici.js:
Name | Type | Default | Description |
---|---|---|---|
align |
|
| The text alignment. |
bgColorColumns |
|
| The background hex color for each column. |
sort |
| The table sort order. |
body
Name | Type | Default | Description |
---|---|---|---|
bgColor |
|
| The background hex color of the body. |
fillEmpty |
|
| An object where the keys are column names and the values are functions which return a value that fills empty values |
peek |
|
| Print only the top and last |
precision |
|
| The floating point precision of numbers. |
striped |
|
| Whether the row background should be striped. |
subset |
|
| Use only a subset of the provided dataset |
textColor |
|
| The text hex color of the rows. |
accumulation
Name | Type | Default | Description |
---|---|---|---|
bgColor |
| '' | The background hex color of the accumulation row. |
columns |
| The accumulation column definitions. | |
separator |
|
| The separator character. |
highlightCell
Name | Type | Default | Description |
---|---|---|---|
bold |
|
| Whether the cell text should be bold. |
func |
|
| The callback to determine whether to highlight or not. |
italic |
|
| Whether the cell text should be italic. |
textColor |
|
| The text hex color of the highlighted cell. |
underline |
|
| Whether the cell text should be underlined. |
highlightRow
Name | Type | Default | Description |
---|---|---|---|
bgColor |
|
| The background hex color of the highlighted row. |
func |
|
| The callback to determine whether to highlight or not. |
border
Name | Type | Default | Description |
---|---|---|---|
color |
|
| The border hex color. |
groupSize |
|
| The number of rows before the horizontal border is applied |
horizontal |
|
| The horizontal border character. |
vertical |
|
| The vertical border character. |
header
Name | Type | Default | Description |
---|---|---|---|
bgColor |
|
| The background hex color of the header. |
bold |
|
| Whether the header names should be written in bold. |
displayNames |
|
| The display names of the columns. |
dynamic |
|
| The dynamic column definitions. |
exclude |
|
| The names of the columns to exclude. |
include |
|
| The names of the columns to include. |
italic |
|
| Whether the header names should be written in italic. |
numeration |
|
| Whether to add a numeration column. |
order |
|
| The column sort order. |
separator |
|
| The separator char between header and body. |
textColor |
|
| The text hex color of the header. |
underline |
|
| Whether the header names should be written in underline. |
uppercase |
|
| Whether the header names should be written in uppercase. |
upperfirst |
|
| Whether the first char of each header name should be written in uppercase. |
width |
|
| The fixed width of each column. |
maxWidth |
|
| The fixed max-width of each column. |
padding
Name | Type | Default | Description |
---|---|---|---|
char |
|
| The padding character. |
size |
|
| The padding size. |
See the TypeDoc documentation too.
Last updated