ColumnOptions
ColumnOptions
Prop | Type | Description | Required | Default |
static |
| Column definitions | ✅ | n/a |
generated |
| Define columns generated from the data set | ❌ |
|
sortColumns |
| Function to sort the order of the columns once generated. Especially useful with | ❌ |
|
ColumnProp
Prop | Type | Description | Required | Default |
name |
| Key for the column. | ✅ | n/a |
calculateCellDefinition |
| Takes an item from your data array prop and returns a Cell. | ✅ | n/a |
title |
| Display this as column head text instead of | ❌ |
|
type |
| Metric will treat Cell display values as numbers | ❌ |
|
display |
| true will show column by default, false will hide by default (can toggle with viewColumns), excluded will never show the column | ❌ |
|
isRowId |
| Use cell value for this column to create an unique row ID. Defaults to true if type is "dimension", false if "metric" | ❌ |
|
summary |
| Show in summary row | ❌ |
|
summaryOptions |
| See below. | ❌ |
|
filter |
| Show in filter data tool. | ❌ |
|
filterOptions |
| See below. | ❌ |
|
viewColumns |
| Show in toggle columns tool. | ❌ |
|
sort |
| Sort data by column? | ❌ |
|
download |
| Show column in csv download? | ❌ |
|
customHeadRender |
| Custom head cell render. Learn more in custom components page. | ❌ |
|
customBodyRender |
| Custom body cell render. Learn more in custom components page. | ❌ |
|
ColSummaryOpts
ColSummaryOpts
Prop | Type | Description | Required | Default |
type |
| How to calculate summary total | ✅ |
|
format |
| Format for the summary values | ✅ |
|
prefix |
| Prefix for value in summary | ❌ |
|
postfix |
| Postfix for value in summary | ❌ |
|
customCalculate |
| Custom calculate function for summary cell | ❌ |
|
customRender |
| Custom render function for summary cell | ❌ |
|
showComparison |
| See below. | ❌ |
|
ColFilterOpts
ColFilterOpts
Prop | Type | Description | Required | Default |
exact |
| Filter using | ✅ |
|
type |
| How to render filter picker | ✅ |
|
defaultOpts |
| Values to include even if not in data | ❌ |
|
sortFilterList |
| Alphabetically sort the filter options? | ❌ |
|
GeneratedColumn
GeneratedColumn
Prop | Type | Description | Required | Default |
path |
| Path of object keys to follow to get root entry. | ✅ | n/a |
nameProp |
| Key of the nested object to use for the column name. | ✅ | n/a |
options |
| Default options to user | ❌ | defaults from ColumnProp |
type |
| Metric will treat Cell display values as numbers. | ❌ |
|
modifyProps |
| Take the generated StateColumn and modify any props. | ❌ |
|
generateRelatedColumns |
| Generate more columns from the initial one generated | ❌ |
|
Last updated