Dynamic Tree Filter
Dynamic Tree Filter, which displays the filtering fields in a tree structure, where the levels are fields with parent-child relationships. The Dynamic Tree Filter differs from the Tree Filter. The Tree Filter is used to display and filter fields with fixed hierarchical relationships, such as "Country-Province-City" or "Year-Month-Day". However, when the hierarchical relationship changes dynamically, such as when the department structure is adjusted and a three-level department becomes a four-level department, the Tree Filter cannot recognize this change and requires rebuilding the filter. The Dynamic Tree Filter, by establishing dynamic hierarchical relationships, can achieve dynamic changes in structural levels. When levels are added or reduced, the Dynamic Tree Filter can automatically recognize the changes in levels without the need for re-editing, and can automatically generate new hierarchical structures.
Create Dynamic Tree Filter
Add a dynamic tree filter to the dashboard, and set the dynamic tree filter field.
- Click New Filter -> Dynamic Filter to create a new filter, adjust the filter size and position.
- Drag in hierarchical fields to establish hierarchical relationships. View the hierarchical structure through the filter.
- Drag in display fields, and the filter options will present the content of the display fields. In the example, the department ID is used to establish hierarchical relationships, and the department name is dragged in for option display. If the dataset uses the department name to establish hierarchical relationships, you do not need to drag in the display fields. In the example, the department name is directly used for parent-child hierarchical association, and the department name is directly used as the filter option, so there is no need to drag in the display fields.
- When the hierarchical relationships in the dataset change, such as adding or reducing hierarchical relationships, the hierarchical structure of the dynamic tree will automatically change with the dataset without the need for editing or modification. In the example, a new R&D Department III is added, and after the dataset data changes, the option is automatically displayed in the filter.
Tip
- When using the dynamic tree filter, the hierarchical fields dragged in must be parent-child relationships, otherwise the dynamic tree filter cannot be used.
- When dragging in hierarchical fields, please drag in the child-level fields first, and then drag in the parent-level fields.
- The dynamic tree filter does not support date type fields.
Configure Dynamic Tree Filter Type
Dynamic tree filters support single and multiple selections. Below are the filters edited according to different filter types.
Configure Single-Select Dynamic Tree Filter
Single-select dynamic tree filters indicate that only one filtering option can be selected at a time for data filtering. Default value settings support dynamic selection and fixed selection.
Dynamic Selection: Dynamically configure the default value of the filter, supporting all, none, custom filtering, and first.
- All: Refers to selecting all options, displaying all data.
- None: Refers to the filter displaying without selecting any options, not using any options to filter data, displaying all data. None supports modifying the prompt message.
- Custom Filtering: Dynamically set the default value of the filter using expressions.
Fixed Selection: Select a specified item of the filter as the default value. In the example, "Project Management Department" is selected as the default option.
Support for enabling all options, after enabling, an additional all option will be added to the options for selecting all.
Configure Multi-Select Dynamic Tree Filter
Multi-select dynamic tree filters allow for the selection of one or more filter options at a time for data filtering. Default value settings support dynamic selection and fixed selection.
Dynamic Selection: Dynamically configure the default value of the filter, supporting all, none, custom filtering, and first.
- All: Refers to selecting all options, displaying all data.
- None: Refers to the filter displaying without selecting any options, not using any options to filter data, displaying all data. None supports modifying the prompt message.
- Custom Filtering: Dynamically set the default value of the filter using expressions.
Fixed Selection: Select a specified item of the filter as the default value. In the example, "R&D Department" and all its subordinate departments are selected as the default options.
- Supports enabling all options. After enabling, an additional "All" option will appear in the options, used for selecting all.
Other Configurations
- NULL value hiding: When this option is checked, any NULL values in the filter options will be hidden.
- Empty value hiding: When this option is checked, any empty values in the filter options will be hidden.
- Cascading selection: When this option is checked, it will link parent and child nodes, selecting or deselecting them simultaneously. For example, selecting a parent node will automatically select all its child nodes, and deselecting the parent node will automatically deselect all its child nodes.
- Internal Filter: Controls the content of the filter field.
Dynamic Tree Filter Style
Set the title and display style in the filter style.
Dynamic Tree Filter Settings
Dynamic tree filter supports the following settings:
- Adjust the hierarchical relationship of filters through Global Settings, making filters interrelated.
- Can be Moved to Sidebar Section to save canvas space.
- Can set Filter Interaction Operations.