Skip to content

Commit 06ac171

Browse files
jwilliams-mongojeff-allen-mongo
authored andcommitted
(DOCSP-8900): As an author, I can link a filter to a field from anoth… (#307)
* (DOCSP-8900): As an author, I can link a filter to a field from another data source * (DOCSP-8900): copy review feedback * (DOCSP-8900): tech review feedback * (DOCSP-8900): updates from DOCSP-9060
1 parent ce6703d commit 06ac171

File tree

3 files changed

+86
-28
lines changed

3 files changed

+86
-28
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ build/*
1010
giza.log
1111
screenshots-temp/*
1212
screenshot-scripts/.properties.ini
13+
.vscode/*

source/dashboard-filtering.txt

Lines changed: 85 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,10 @@ Dashboard filters refine data across all charts in a dashboard,
1919
allowing you to view a common subset of data in all of a dashboard's
2020
charts.
2121

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. Authenticated dashboard users
25-
can filter based on values they specify and save their own default
26-
filter values.
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. All dashboard users can filter
25+
based on values they specify and save their own default filter values.
2726

2827
.. note::
2928

@@ -40,11 +39,12 @@ filter values.
4039
.. note::
4140

4241
Dashboard ``Authors`` or ``Owners`` define filters using specific
43-
data sources. A single filter might not refine all dashboard charts
44-
if it contains charts mapped to more than one data source.
42+
data sources. A single filter might not refine all charts if the
43+
dashboard contains charts mapped to data sources that the filter
44+
doesn't use.
4545

46-
Use Case
47-
~~~~~~~~
46+
Example Scenario
47+
~~~~~~~~~~~~~~~~
4848

4949
A dashboard ``Author`` creates a dashboard with charts that contain
5050
sales data for all of a company's customers. The author creates a
@@ -87,12 +87,14 @@ pane.
8787
is highlighted.
8888

8989
The :guilabel:`Dashboard Filters` pane displays a filter card for
90-
each field you can use to filter chart data. When you update a field
91-
value, |charts-short| updates dashboard charts to display data that
92-
matches the field values you provide.
90+
each field you can use to filter chart data. You can configure filter
91+
cards to use related fields from multiple data sources. When you update
92+
a field value, |charts-short| updates dashboard charts to display data
93+
that matches the field values you provide from all configured data
94+
sources.
9395

9496
In the following example, a dashboard ``Author`` creates filters on
95-
the ``genres`` and ``year`` fields for a sample movie dataset. The
97+
the ``genres`` and ``year`` fields from two sample movie datasets. The
9698
``Author`` sets default values for these fields to only display Science
9799
Fiction and Horror movies released in or after 1968. Dashboard
98100
``Viewers`` can provide their own values for the filterable fields to
@@ -120,24 +122,72 @@ Add Dashboard Filters
120122
~~~~~~~~~~~~~~~~~~~~~
121123

122124
You can specify fields that any dashboard users can filter data with.
123-
When you create a dashboard filter, you select a field from a data
124-
source that a dashboard chart uses. You can add dashboard filters based
125-
on any number of data sources that a dashboard chart uses.
125+
When you create a dashboard filter, you select related fields from the
126+
data sources that a dashboard chart uses. You can add dashboard filters
127+
based on any number of data sources that a dashboard chart uses.
128+
129+
Filter cards that use multiple data sources query each chart using
130+
the name of the field from the applicable data set.
131+
132+
.. example::
133+
134+
Chart ``A`` uses data set ``A``. Chart ``B`` uses data set ``B``.
135+
Field ``A`` in data set ``A`` and field ``B`` in data set ``B``
136+
contain related information. You add both fields to a single
137+
filter card.
138+
139+
When a filter affects chart ``A``, the query for that chart uses
140+
field ``A`` only. When a filter affects chart ``B``, the query for
141+
that chart uses field ``B`` only.
126142

127143
To add a dashboard filter:
128144

129145
1. Expand the :guilabel:`Dashboard Filters` pane on the desired
130146
dashboard.
131147
#. If a dashboard has no filers, click :guilabel:`Add Filters`.
132148
Otherwise, click :guilabel:`Edit`.
133-
#. Expand the data source that contains the fields you want to add a
134-
filter for.
135-
#. Drag a field from the data source to the drop zone.
149+
#. Expand a data source that contains fields you want to add a filter
150+
for.
151+
#. Drag a field from the data source to the :guilabel:`+ filter` drop
152+
zone.
136153

137154
.. tip::
138155

139156
To search for specific data fields, use the search bar at the
140157
upper left corner of the :guilabel:`Edit Dashboard Filters` pane.
158+
159+
The data source name appears below the field name in the filter card.
160+
161+
#. (*Optional*) You can stack fields from other data sources. This
162+
allows you to use a single filter to refine chart data from related
163+
fields from multiple data sources.
164+
165+
.. admonition:: To stack fields in a filter card:
166+
:class: note
167+
168+
- Each field must be of the same :ref:`data type <filter-tab>` as
169+
the other fields on the filter card.
170+
171+
- The filter card must not have another field from the selected
172+
data source on it.
173+
174+
To stack fields from other data sources:
175+
176+
a. Expand another data source that contains a related field.
177+
178+
b. Drag a field from the data source to the
179+
:guilabel:`+ another field` drop zone on the same filter card.
180+
181+
The data source name appears below the field name and the other data
182+
sources you selected fields from in the filter card.
183+
184+
.. note::
185+
186+
The field names might differ from each data source. The filter
187+
card lists the field name you used to create the filter.
188+
189+
Click :icon-fa4:`trash-o` next to a data source to remove its field
190+
from a filter card.
141191

142192
#. (*Optional*) Supply default values for the field in the filter card.
143193
All dashboard viewers see chart data that matches the default field
@@ -155,10 +205,6 @@ To add a dashboard filter:
155205
#. Repeat for each field you want users to filter data by.
156206
#. Click :guilabel:`Apply Filters`.
157207

158-
You can optionally provide default values for each field. |charts-short|
159-
filters dashboard charts using these values until a user provides their
160-
own values.
161-
162208
.. _edit-dashboard-filters:
163209

164210
Edit Dashboard Filters
@@ -168,6 +214,7 @@ After you create a dashboard filter, you can:
168214

169215
- Enable or disable filter cards.
170216
- Add or remove fields.
217+
- Stack fields from other data sources.
171218
- Change the default field values.
172219

173220
To edit a dashboard filter:
@@ -203,8 +250,10 @@ Filter Dashboards
203250
You can filter the dashboard data based on the filterable fields
204251
that an ``Author`` or ``Owner`` configured. |charts-short| filters
205252
data based on default field values if the dashboard ``Author`` or
206-
``Owner`` configured them. You can provide your own field values to
207-
customize the data the charts display.
253+
``Owner`` configured them. Dashboard ``Authors`` or ``Owners`` can
254+
configure filter cards to use related fields from multiple data sources.
255+
You can provide your own field values to customize the data the charts
256+
display.
208257

209258
To filter dashboard data based on filterable fields:
210259

@@ -216,14 +265,22 @@ To filter dashboard data based on filterable fields:
216265

217266
The filter card options are based on the data type of the field.
218267
To learn about filtering options for each field data type, see
219-
:ref:`filter-tab`.
268+
:ref:`filter-tab`.
269+
270+
.. note::
271+
272+
If the filter card field is a ``String`` or ``ObjectId``,
273+
|charts-short| only samples field values from the first data
274+
source that was added to the filter.
275+
276+
Updating the filter value refines chart data based on all data
277+
sources linked to the filter card.
220278

221-
The charts refresh immediately after you modify a field value.
279+
The charts refresh immediately after you modify a field value.
222280

223281
.. _revert-dashboard-filters:
224282

225283
Revert Dashboard Filters to Default Values
226284
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
227285

228286
To revert a filter card to its default values, click :icon-fa4:`undo`.
229-
34.6 KB
Loading

0 commit comments

Comments
 (0)