Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the filter file(s) documentation #271

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions docs/dashboards.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* [Overrides](#overrides)
* [`.md` files](#md-files)
* [Markdown header arguments](#markdown-header-arguments)
* [`.filter.json` file(s)](#filterjson-files)
* [`dashboard.yml` file](#dashboardyml-file)
* [Using as library](#using-as-library)
* [Configuration precedence](#configuration-precedence)
Expand Down Expand Up @@ -247,29 +248,27 @@ The following text tile arguments are supported:

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

## `.filter.json` files
## `.filter.json` file(s)

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:
A filter file contains a 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:

| Flag | Description | Type | Optional |
|---------------|----------------------------------------------------|------------|----------|
| column | The columns the filter is applied. | str. | No* |
| columns | The columns the filter is applied. | list[str] | No* |
| columns | The columns the filter is applied. | list[str] | No |
| type | The filter type, by default multi-select drop down | str | Yes |
| title | The filter title | str | Yes |
| description | The filter description | str | Yes |
| order | The widget order | str | Yes |
| id | The widget id | str | Yes |

> *column and columns are exclusive, one is required.

An example filter would be:

```json
{
"column": "Country",
"columns": ["Country"],
"title": "Countries",
"description": "Filter which countries are vizualized"
"description": "Filter which countries are visualized"
}
```

Expand Down
Loading