Skip to content

Commit 0163dc6

Browse files
JCZuurmondnfx
andauthored
Add design for filter file (#251)
Design for #252 --------- Co-authored-by: Serge Smertin <259697+nfx@users.noreply.github.com>
1 parent 5255e6d commit 0163dc6

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

docs/dashboards.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,32 @@ The following text tile arguments are supported:
247247

248248
[[back to top](#dashboards-as-code)]
249249

250+
## `.filter.json` files
251+
252+
The filter files contain filter definition for filters linked to multiple widgets. The filter is applied to all widget that have the given column. The schema is defined as follows:
253+
254+
| Flag | Description | Type | Optional |
255+
|---------------|----------------------------------------------------|------------|----------|
256+
| column | The columns the filter is applied. | str. | No* |
257+
| columns | The columns the filter is applied. | list[str] | No* |
258+
| type | The filter type, by default multi-select drop down | str | Yes |
259+
| title | The filter title | str | Yes |
260+
| description | The filter description | str | Yes |
261+
| order | The widget order | str | Yes |
262+
| id | The widget id | str | Yes |
263+
264+
> *column and columns are exclusive, one is required.
265+
266+
An example filter would be:
267+
268+
```json
269+
{
270+
"column": "Country",
271+
"title": "Countries",
272+
"description": "Filter which countries are vizualized"
273+
}
274+
```
275+
250276
## `dashboard.yml` file
251277

252278
The `dashboard.yml` file is used to define a top-level metadata for the dashboard, such as the display name. Also,

0 commit comments

Comments
 (0)