Skip to content

Commit 341ce2b

Browse files
jwilliams-mongojeff-allen-mongo
authored andcommitted
(dashboard-filtering): documenting Charts dashboard filtering feature (#290)
* (dashboard-filtering): initial commit * (dashboard-filtering): checkpoint commit 1 * (dashboard-filtering): fix typo * (dashboard-filtering): copy review feedback * (dashboard-filtering): more copy review feedback * (dashboard-filtering): final copy review changes * (dashboard-filtering): tech review feedback * (dashboard-filtering): replacing outdated dashboard permissions image * (dashboard-filterting): more tech review feedbacl
1 parent b9bcad3 commit 341ce2b

8 files changed

+229
-5
lines changed

source/dashboard-filtering.txt

Lines changed: 215 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,215 @@
1+
.. _dashboard-filtering:
2+
3+
=================================
4+
Filter Dashboards by Field Values
5+
=================================
6+
7+
.. default-domain:: mongodb
8+
9+
.. contents:: On this page
10+
:local:
11+
:backlinks: none
12+
:depth: 2
13+
:class: singlecol
14+
15+
Dashboard Filters
16+
-----------------
17+
18+
Dashboard filters refine data across all charts in a dashboard,
19+
allowing you to view a common subset of data in all of a dashboard's
20+
charts.
21+
22+
Dashboard ``Authors`` or ``Owners`` set the fields that any dashboard
23+
users can filter data with. ``Authors`` or ``Owners`` can also set
24+
initial default values for each filter. Any dashboard users can filter
25+
based on values they specify and save their own default filter values.
26+
27+
.. figure:: /images/charts/dashboard-filter-cards.png
28+
:figwidth: 720px
29+
:alt: An image of a dashboard. Two filter cards are highlighted. The
30+
charts only display data that corresponds to the selected field
31+
values.
32+
33+
.. note::
34+
35+
Dashboard ``Authors`` or ``Owners`` define filters using specific
36+
data sources. A single filter might not refine all dashboard charts
37+
if it contains charts mapped to more than one data source.
38+
39+
Use Case
40+
~~~~~~~~
41+
42+
A dashboard ``Author`` creates a dashboard with charts that contain
43+
sales data for all of a company's customers. The author creates a
44+
filter allowing dashboard viewers to select which region(s) to
45+
display data from. Members of a sales team use this filter to display
46+
customer data only for the region(s) that they cover.
47+
48+
Filter Persistence Per Dashboard Viewer
49+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
50+
51+
|charts-short| persists the following states for each dashboard viewer
52+
across reloads and user sessions:
53+
54+
- which filters are enabled or disabled
55+
- field values chosen to filter dashboards
56+
- whether the :guilabel:`Dashboard Filters` is expanded or collapsed.
57+
58+
The changes that a dashboard viewer makes to filters don't affect other
59+
|charts-short| users. A viewer's saved filters are not affected when a
60+
dashboard ``Author`` or ``Owner`` modifies a filter's default values
61+
unless you :ref:`reset a filter <revert-dashboard-filters>`.
62+
63+
The :guilabel:`Dashboard Filters` Pane
64+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
65+
66+
The :guilabel:`Dashboard Filters` icon indicates the number of active
67+
filters. Click the icon to expand the :guilabel:`Dashboard Filters`
68+
pane.
69+
70+
.. figure:: /images/charts/expand-filter-pane.png
71+
:figwidth: 720px
72+
:alt: An image of a dashboard. The :guilabel:`Dashboard Filters` icon
73+
is highlighted.
74+
75+
The :guilabel:`Dashboard Filters` pane displays a filter card for
76+
each field you can use to filter chart data. When you update a field
77+
value, |charts-short| updates dashboard charts to display data that
78+
matches the field values you provide.
79+
80+
In the following example, a dashboard ``Author`` creates filters on
81+
the ``genres`` and ``year`` fields for a sample movie dataset. The
82+
``Author`` sets default values for these fields to only display Science
83+
Fiction and Horror movies released in or after 1968. Dashboard
84+
``Viewers`` can provide their own values for the filterable fields to
85+
refine chart data based on their interests.
86+
87+
.. figure:: /images/charts/edit-dashboard-filters.png
88+
:figwidth: 720px
89+
:alt: An image of a dashboard. The :guilabel:`Edit Dashboard Filters`
90+
pane is highlighted.
91+
92+
To learn about filtering options for each field data type, see
93+
:ref:`filter-tab`.
94+
95+
.. _manage-dashboard-filters:
96+
97+
Manage Dashboard Filters
98+
------------------------
99+
100+
Dashboard ``Authors`` and ``Owners`` can add, edit, and delete dashboard
101+
filters.
102+
103+
.. _add-dashboard-filters:
104+
105+
Add Dashboard Filters
106+
~~~~~~~~~~~~~~~~~~~~~
107+
108+
You can specify fields that any dashboard users can filter data with.
109+
When you create a dashboard filter, you select a field from a data
110+
source that a dashboard chart uses. You can add dashboard filters based
111+
on any number of data sources that a dashboard chart uses.
112+
113+
To add a dashboard filter:
114+
115+
1. Expand the :guilabel:`Dashboard Filters` pane on the desired
116+
dashboard.
117+
#. If a dashboard has no filers, click :guilabel:`Add Filters`.
118+
Otherwise, click :guilabel:`Edit`.
119+
#. Expand the data source that contains the fields you want to add a
120+
filter for.
121+
#. Drag a field from the data source to the drop zone.
122+
123+
.. tip::
124+
125+
To search for specific data fields, use the search bar at the
126+
upper left corner of the :guilabel:`Edit Dashboard Filters` pane.
127+
128+
#. (*Optional*) Supply default values for the field in the filter card.
129+
All dashboard viewers see chart data that matches the default field
130+
values you provide until they provide their own filter values or
131+
disable the filter card.
132+
133+
The filter card options are based on the data type of the field.
134+
To learn about filtering options for each field data type, see
135+
:ref:`filter-tab`.
136+
137+
#. Use the toggle to disable or enable the filter card by default. If
138+
disabled, each dashboard user must enable the filter card to display
139+
data the filter refines.
140+
141+
#. Repeat for each field you want users to filter data by.
142+
#. Click :guilabel:`Apply Filters`.
143+
144+
You can optionally provide default values for each field. |charts-short|
145+
filters dashboard charts using these values until a user provides their
146+
own values.
147+
148+
.. _edit-dashboard-filters:
149+
150+
Edit Dashboard Filters
151+
~~~~~~~~~~~~~~~~~~~~~~
152+
153+
After you create a dashboard filter, you can:
154+
155+
- Enable or disable filter cards.
156+
- Add or remove fields.
157+
- Change the default field values.
158+
159+
To edit a dashboard filter:
160+
161+
1. Expand the :guilabel:`Dashboard Filters` pane on the desired
162+
dashboard, then click :guilabel:`Edit`.
163+
#. Make the changes you want to each filter card.
164+
#. Click :guilabel:`Apply Filters`.
165+
166+
.. _delete-dashboard-filters:
167+
168+
Delete Dashboard Filters
169+
~~~~~~~~~~~~~~~~~~~~~~~~
170+
171+
1. Expand the :guilabel:`Dashboard Filters` pane on the desired
172+
dashboard, then click :guilabel:`Edit`.
173+
#. Hover of the filter card you want to delete, then click
174+
:icon-fa4:`trash-o`.
175+
#. Click :guilabel:`Apply Filters`.
176+
177+
Use Dashboard Filters
178+
----------------------
179+
180+
Any user with at least the ``Viewer`` role on a dashboard *and* the data
181+
source backing a field can view the filter card and provide their own
182+
values for the filter.
183+
184+
.. _filter-dashboards:
185+
186+
Filter Dashboards
187+
~~~~~~~~~~~~~~~~~
188+
189+
You can filter the dashboard data based on the filterable fields
190+
that an ``Author`` or ``Owner`` configured. |charts-short| filters
191+
data based on default field values if the dashboard ``Author`` or
192+
``Owner`` configured them. You can provide your own field values to
193+
customize the data the charts display.
194+
195+
To filter dashboard data based on filterable fields:
196+
197+
1. Expand the :guilabel:`Dashboard Filters` pane on the desired
198+
dashboard.
199+
#. If a filter card is disabled, click the toggle to enable it.
200+
#. Modify the values of the provided fields to update the dashboard's
201+
charts based on the filter values you provided.
202+
203+
The filter card options are based on the data type of the field.
204+
To learn about filtering options for each field data type, see
205+
:ref:`filter-tab`.
206+
207+
The charts refresh immediately after you modify a field value.
208+
209+
.. _revert-dashboard-filters:
210+
211+
Revert Dashboard Filters to Default Values
212+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
213+
214+
To revert a filter card to its default values, click :icon-fa4:`undo`.
215+

source/dashboard-permissions.txt

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,24 @@ following dashboard permissions are available:
2727
- Description
2828

2929
* - Viewer
30-
- Can open a dashboard and view charts provided they have the
31-
``Viewer`` role on the data source backing this dashboard. If
32-
the user does not have the ``Viewer`` role on a chart's backing
33-
data source, the chart doesn't render in the dashboard.
30+
- Can perform the following actions:
31+
32+
- Open a dashboard and view charts that are backed by a data
33+
source the user has permission to view. If the user doesn't
34+
have the :ref:`Viewer <data-source-roles>` role on a chart's
35+
backing data source, the dashboard doesn't render the chart.
36+
37+
``Viewers`` cannot make any modifications to the dashboard.
3438

35-
``Viewers`` cannot make any modifications to the dashboard.
39+
- Filter dashboards based on available fields.
3640

3741
* - Author
3842
- Can perform the following actions:
3943

4044
- Add, modify, and delete charts,
45+
- :ref:`Add <add-dashboard-filters>`,
46+
:ref:`edit <edit-dashboard-filters>`,
47+
and :ref:`delete <delete-dashboard-filters>` dashboard filters,
4148
- Specify which fields can be used for
4249
:ref:`Unauthenticated embedded chart filters
4350
<specify-filter-fields>`,

source/dashboards.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,5 +169,6 @@ top-right of the dashboard or press the escape key.
169169
.. toctree::
170170
:titlesonly:
171171

172+
/dashboard-filtering
172173
/manage-dashboards
173174
/dashboard-permissions
-62.4 KB
Loading
Loading
Loading
140 KB
Loading

source/manage-dashboards.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ To duplicate a dashboard from the Dashboards tab:
5555
user of the newly duplicated dashboard. To grant other users access,
5656
update the dashboard's :doc:`permissions </dashboard-permissions>`.
5757

58+
5859
Author Actions
5960
--------------
6061

0 commit comments

Comments
 (0)