Flexible keys and Grouping
🚧 This section is a work in progress 🚧
Flexible keys:
- enable your visualisatons to react to dataset changes from interactive filtering.
- allow you visualisations to be less rigid and become multipurpose.
contents
When to use
TBD
How it works
TBD
Definition
column: {
key: [
{
id: "final-fallback-group-id",
optional: true
},
{
id: "secondary-fallback-group-id",
optional: true
},
{
id: "primary-group-id",
optional: true
}
],
measure: [
...
]
}
key
| Name | Type | Required | Description |
|---|---|---|---|
id |
string | Yes | The id/column name of the column within the dataset |
display |
string | no | The display name of the column |
optional |
boolean | no | Defines whether the key is optional |
Examples
The following examples will demonstrate how to use flexible keys of using the list visualisation type.
Example Dataset
| ts | est_id | wing | cell | diet | count |
|------------|----------| ------|-------|-------------|-------|
| 2025/02/25 | | | | | 5000 |
| 2025/02/25 | MDI | | | | 1109 |
| 2025/02/25 | MDI | north | | | 140 |
| 2025/02/25 | MDI | north | cell1 | | 30 |
| 2025/02/25 | MDI | north | cell2 | | 29 |
| 2025/02/25 | MDI | north | cell3 | | 13 |
| 2025/02/25 | MDI | north | cell4 | | 26 |
| 2025/02/25 | MDI | north | cell5 | | 42 |
| 2025/02/25 | | | | vegetarian | 1507 |
| 2025/02/25 | | | | pescatarian | 1130 |
| 2025/02/25 | | | | vegan | 1354 |
| 2025/02/25 | | | | omnivore | 1009 |
| 2025/02/25 | MDI | | | vegetarian | 169 |
| 2025/02/25 | MDI | | | pescatarian | 463 |
| 2025/02/25 | MDI | | | vegan | 397 |
| 2025/02/25 | MDI | | | omnivore | 80 |
Example 1
TBD
Definition
{
id: 'example-1',
type: 'vis-type',
display: 'Example definition',
description: 'Example definition description',
option: {},
column: {
key: [],
measure: [],
filter: []
expectNull: true,
},
}
Visualisation dataset
This definition will return the following dataset
see here for more info on targeting data