Skip to content

Commit 755a6d0

Browse files
davidhou17kanchana-mongodbsarahsimperscorryroot
authored
1.26 release (#493)
* (DOCSP-10895): Add new dashboard screenshot * (DOCSP-17407): Update docs to reflect new color customization UI (#485) * (DOCSP-17407): Update docs to reflect new color customization UI * Tech review feedback * (DOCSP-17715): Update customization page with latest UI screenshots (#490) * (DOCSP-17655): highlight elements on an embedded chart (#488) * DOCSP-17655 highlight elements on an embedded chart * DOCSP-17655 updates for review feedback * DOCSP-17655 updates to example per feedback * DOCSP-17655 updates for copy review feedback * (DOCSP-17338) Adds new options to period filter (#486) * (DOCSP-17338) Adds new options to period filter * Includes copy review changes * (DOCSP-17330) Adds button to opt a chart into/out of dashboard filtering (#487) * (DOCSP-17330) Adds button to opt a chart into/out of dashboard filtering * Includes changes from copy review * Includes tech review changes * (DOCSP-17562), (DOCSP-17563), (DOCSP-17564): Added details for the fullscreen charts view. (#491) * (DOCSP-17562), (DOCSP-17563), (DOCSP-17564): Added details for the fullscreen charts view. * (DOCSP-17562), (DOCSP-17563), (DOCSP-17564): Incorporated Kanchana's feedback. * (DOCSP-17926): Charts 1.26 Release notes (#492) * (DOCSP-17926): Charts 1.26 Release notes * Copy/tech review Co-authored-by: kanchana-mongodb <[email protected]> Co-authored-by: sarahsimpers <[email protected]> Co-authored-by: corryroot <[email protected]>
1 parent d85dcc1 commit 755a6d0

15 files changed

+368
-84
lines changed

source/customize-charts/general-customization.txt

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -52,28 +52,35 @@ series.
5252
Depending on the chart type, each color swatch has a corresponding
5353
number or a corresponding name:
5454

55-
- Single-series charts or multi-series charts created
56-
:ref:`using the Series method<charts-series-encoding>`
57-
have numbered color swatches.
58-
- Multi-series charts created by
59-
:ref:`mapping multiple fields<multiple-field-mappings>`
55+
- Single-series charts have a single numbered swatch.
56+
- Multi-series charts built by
57+
:ref:`mapping multiple fields <multiple-field-mappings>`
6058
have color swatches with the names of your selected fields.
59+
- Multi-series charts built with a numeric or date field in the
60+
:ref:`Series channel <charts-series-encoding>` have numbered color
61+
swatches.
62+
- Multi-series charts built with a string field in the
63+
:ref:`Series channel <charts-series-encoding>` allow you to
64+
choose how you want to assign color. For numbered color swatches, select
65+
the :guilabel:`By Order` option. For swatches with
66+
field names, select the :guilabel:`By Series` option.
6167

6268
To change the color of the corresponding data series, click the color swatch.
6369
You can select a new color with a color slider, by
6470
entering a hex value, by entering RGB values, or by choosing a
65-
predefined color. You can also drag and drop numbered color swatches to
71+
predefined color. You can also drag and drop color swatches to
6672
rearrange the colors in your palette.
6773

6874
.. note::
6975

70-
By default, the custom color picker shows color swatches for 10
71-
data series, but you can only modify as many of the swatches as
72-
you have data series. The palette can expand to show 20 data series.
73-
Charts will use as many colors as needed to show your chart,
74-
starting from the first color. For example, if you have only two
75-
data series in your chart, only the colors numbered ``1`` and
76-
``2`` have any effect on your chart.
76+
For multi-series charts with numbered color swatches,
77+
the custom color palette shows swatches for 10
78+
data series by default, and it can expand
79+
to show up to 20 data series. However, you can only modify as many
80+
swatches as you have data series. For example, if you have two
81+
data series in your chart, only the swatches numbered ``1`` and
82+
``2`` have an effect on your chart. If additional series appear
83+
while the chart is rendering, Charts assigns them a new color.
7784

7885
Other chart types use a gradient color scale with a
7986
set of pre-defined gradients. The

source/dashboard-filtering.txt

Lines changed: 56 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,19 @@ Filter Dashboards by Field Values
1515
Dashboard Filters
1616
-----------------
1717

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
18+
Dashboard filters refine data across some or all of the charts in a dashboard.
19+
They allow you to view a common subset of data across the 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. All dashboard users can filter
25-
based on values they specify and save their own default filter values.
22+
Dashboard ``Authors`` or ``Owners`` can:
23+
24+
- Select the fields that all dashboard users can use to filter data.
25+
- Set initial default values for each filter.
26+
- Disable filtering for a specific chart. Disabling filtering
27+
exempts the chart from dashboard filters.
28+
29+
All dashboard users can filter based on values they specify and save their own
30+
default filter values.
2631

2732
.. note::
2833

@@ -39,9 +44,14 @@ based on values they specify and save their own default filter values.
3944
.. note::
4045

4146
Dashboard ``Authors`` or ``Owners`` define filters using specific
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.
47+
data sources and can :ref:`disable filtering on specific charts
48+
<disable-filtering-on-chart>`. A single filter might not refine all charts
49+
if:
50+
51+
- The dashboard contains charts mapped to data sources that the filter
52+
doesn't use.
53+
- A dashboard ``Author`` or ``Owner`` :ref:`disables filtering
54+
<disable-filtering-on-chart>` on some charts.
4555

4656
Example Scenario
4757
~~~~~~~~~~~~~~~~
@@ -123,8 +133,10 @@ Enabled, collapsed filters are still applied to your charts.
123133
Manage Dashboard Filters
124134
------------------------
125135

126-
Dashboard ``Authors`` and ``Owners`` can add, edit, and delete dashboard
127-
filters.
136+
Dashboard ``Authors`` and ``Owners`` can:
137+
138+
- Add, edit, and delete dashboard filters.
139+
- Disable dashboard filters on specific charts.
128140

129141
.. _add-dashboard-filters:
130142

@@ -245,6 +257,39 @@ Delete Dashboard Filters
245257
:icon-fa4:`trash-o`.
246258
#. Click :guilabel:`Apply Filters`.
247259

260+
.. _disable-filtering-on-chart:
261+
262+
Disable Dashboard Filters for a Chart
263+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
264+
265+
You can disable filtering for a specific chart if you create at least one
266+
dashboard filter on the chart's data source. If you disable filtering, the
267+
chartis exempted from all dashboard filters. The default selection for all
268+
charts is :guilabel:`Respond to dashboard filters`.
269+
270+
To disable dashboard filtering for a chart:
271+
272+
1. Hover over the chart on the dashboard to reveal four buttons in the upper right
273+
corner of the chart.
274+
#. Click the second button (for :guilabel:`Interactive Filters`) and
275+
select :guilabel:`Disable Filtering` from the dropdown.
276+
277+
.. note::
278+
279+
You can't change this setting until you've created at least one dashboard
280+
filter on the chart's data source.
281+
282+
Once you disable filtering, the :guilabel:`Interactive Filters`
283+
button icon on the chart changes for all users. Users with the ``Viewer`` role
284+
can also see a tooltip if they click the :guilabel:`Interactive Filters` button,
285+
which says ":guilabel:`The dashboard owner has not enabled filtering for
286+
this chart`."
287+
288+
To reenable dashboard filtering for a chart:
289+
290+
1. Click the :guilabel:`Interactive Filters` button.
291+
2. Select :guilabel:`Respond to dashboard filters` from the dropdown.
292+
248293
Use Dashboard Filters
249294
----------------------
250295

source/dashboards.txt

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -251,35 +251,43 @@ From the :guilabel:`Dashboards` page:
251251

252252
.. _fullscreen-view:
253253

254-
Fullscreen View
255-
---------------
254+
Fullscreen Dashboard View
255+
-------------------------
256256

257257
|charts| provides a fullscreen view for dashboards. In this view,
258258
|charts| hides the main navigation bar and expands the dashboard to
259259
show the title, description, time of last modification, and charts in
260260
the entire space of the screen.
261261

262-
To open a dashboard in fullscreen view, first select a dashboard from
263-
the :guilabel:`Dashboards` page, then click the expanding arrows at the
264-
top-right of the dashboard:
262+
To enter the fullscreen view for dashboards:
263+
264+
1. Select a dashboard from the :guilabel:`Dashboards` page.
265+
266+
#. Click the expanding arrows at the top-right of the dashboard.
265267

266268
.. figure:: /images/charts/full-screen-view.png
267269
:figwidth: 750px
268270
:alt: Fullscreen Arrows
269271

270272
.. note::
271273

272-
You can still :ref:`remove <dashboard-remove-chart>`, :ref:`resize
273-
<dashboard-resize-chart>`, :ref:`rearrange
274-
<dashboard-rearrange-chart>`, and :ref:`access editing
275-
<dashboard-edit-chart>` for charts in fullscreen view by hovering
276-
over the desired chart.
274+
In the fullscreen view for dashboards, you can still:
275+
276+
- :ref:`Remove <dashboard-remove-chart>`, :ref:`resize
277+
<dashboard-resize-chart>`, :ref:`rearrange
278+
<dashboard-rearrange-chart>`, and :ref:`edit
279+
<dashboard-edit-chart>` charts by hovering over the desired chart.
280+
281+
- Configure auto-refresh settings and manually refresh chart data.
282+
283+
- Enter the :ref:`fullscreen charts view <fullscreen-charts-view>`.
284+
285+
To exit the fullscreen view for dashboards, do one of the following
286+
tasks:
277287

278-
Additionally, in fullscreen view you can still configure
279-
auto-refresh settings and manually refresh chart data.
288+
- Click the contracting arrows at the top-right of the dashboard.
280289

281-
To exit fullscreen view, either click the contracting arrows at the
282-
top-right of the dashboard or press the escape key.
290+
- Press the escape key.
283291

284292
.. toctree::
285293
:titlesonly:

source/embedding-charts-sdk.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,5 +108,6 @@ Other examples are available in the :github:`MongoDB Embedding SDK Examples
108108

109109
/configure-auth-providers
110110
/handle-click-events
111+
/highlight-chart-elements
111112
/embedding-tutorials
112113
Embedding SDK Reference <https://www.npmjs.com/package/@mongodb-js/charts-embed-dom>

source/filter-chart-results.txt

Lines changed: 62 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,17 @@ Filter Chart Results
1313
:class: singlecol
1414

1515
Filters display a subset of results that match a given criteria.
16-
|charts| provides two ways to filter your data. You can either use:
16+
|charts| provides two ways to filter the data for a single chart. You can either use:
1717

1818
- The :ref:`Filter Tab's <filter-tab>` numeric, string, date, or boolean fields to handle most of your data
1919
filtering needs.
2020

2121
- The :ref:`Query Bar <query-bar>` to filter your data using more complex queries, such as logical operator
2222
queries, or process raw data by using the aggregation pipeline.
2323

24+
To learn how to filter results across multiple charts on your dashboard, see
25+
:ref:`<dashboard-filtering>`.
26+
2427
.. _filter-tab:
2528

2629
Create Filters for Your Data
@@ -188,64 +191,77 @@ options. You can filter fields with the following data types:
188191
:tabid: period-date
189192

190193
Period date filters specify a range relative to the current
191-
time when the chart is rendered. To define an period date range,
194+
time when the chart renders. To define a period date range,
192195
select :guilabel:`Period` at the top of your date filter card.
193196

194197
Period options include:
195198

196-
- Hour (from the top of the hour)
197-
- Day (from midnight)
198-
- Week (from midnight Sunday)
199-
- Month (from midnight on the 1st of the month)
200-
- Year (from midnight on the 1st of January)
201-
202-
The Period date filter has two usage options:
203-
204-
- **Current**. The start date is the beginning of the selected
205-
period before the current time, and the end date is the
206-
end of the selected period. For example, the :guilabel:`Month`
207-
option includes only data from the current month, starting at
208-
midnight on the first day of the month and extending until
209-
the last day of the month.
199+
- :guilabel:`Hour` from the top of the hour
200+
- :guilabel:`Day` from midnight
201+
- :guilabel:`Week` from midnight Sunday
202+
- :guilabel:`Month` from midnight on the 1st of the month
203+
- :guilabel:`Year` from midnight on the 1st of January
210204

211-
- **Previous**. The start date is the beginning of the previous
212-
period, and the end date is the start of the most recent
213-
period before the current time. For example, the :guilabel:`Day`
214-
option includes only data from the day before the current day
215-
up until midnight of the current day.
216-
217-
.. list-table::
218-
:header-rows: 1
219-
220-
* - To use the **Current** option:
221-
- To use the **Previous** option:
222-
223-
* - 1. Select :guilabel:`Current` from the left dropdown
224-
menu.
225-
226-
#. Choose a time period from the right dropdown menu.
227-
Chart data is restricted to the time period from
228-
the beginning of the selected period to the end of
229-
the selected period.
205+
The Period date filter also has usage options. Together with the
206+
period, the usage options let you define an exact window of time in
207+
the past, present, or future.
230208

231-
- 1. Select :guilabel:`Previous` from the left dropdown
232-
menu.
209+
Period usage options include:
210+
211+
- **Direction**. You can select :guilabel:`Previous` to show past
212+
periods or :guilabel:`Next` to show future periods.
213+
- **Count**. You can set the number of periods to display.
214+
- **Include Current Period**. You can include the current period in
215+
the specified time window.
216+
217+
Period usage options work together. The data that |charts| displays
218+
for the :guilabel:`Month` period depends on the direction, count,
219+
and :guilabel:`Include current period` selection.
220+
221+
|charts| counts the number of periods you specify backwards (for :guilabel:`Previous`) or
222+
forwards (for :guilabel:`Next`). Counting starts at the beginning of
223+
the current period (with :guilabel:`Include current period` selected),
224+
or the beginning of the last completed period (without
225+
:guilabel:`Include current period` selected). |charts| displays the
226+
data from the beginning of the selected period(s) through the end of
227+
the selected period(s).
228+
229+
.. example::
233230

234-
#. Choose a time period from the right dropdown menu.
235-
Chart data is restricted to the time period from
236-
the beginning of the selected period to the beginning
237-
of the next period after the selected one.
231+
If today is December 8 and you set a period date filter on
232+
``released`` with the following selections:
238233

239-
.. example::
234+
- :guilabel:`Previous`
235+
- ``3``
236+
- :guilabel:`Months`, and
237+
- :guilabel:`Include current period` selected
240238

241-
The following period date filter only shows documents
242-
with a ``released`` field that is in the current week,
243-
starting from midnight of the most recent Sunday.
239+
|charts| would show documents with a released date from
240+
October 1 of this year to December 31 of this year, including
241+
the start and end dates.
244242

245243
.. figure:: /images/charts/period-date.png
246-
:scale: 70%
244+
:figwidth: 300px
247245
:alt: Image showing period date filter
248246

247+
However, if you set the same filter without selecting
248+
:guilabel:`Include current period`, |charts| would show documents
249+
with a released date from
250+
September 1 of this year to November 30 of this year, including
251+
the start and end dates.
252+
253+
254+
To set a Period date filter:
255+
256+
1. Select a period direction from the first dropdown
257+
menu.
258+
#. Enter a numeric value for the period count in the text entry field. You
259+
can enter whole numbers or decimal values.
260+
#. Choose a period the next dropdown menu.
261+
#. (Optional) Deselect :guilabel:`Include current period` to exclude the current
262+
period. :guilabel:`Include current period` is the default selection.
263+
264+
249265
.. tab:: Absolute
250266
:tabid: absolute-date
251267

source/handle-click-events.txt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,25 @@ filter document contains both the category and series filter pairs.
258258
Each filter must reference the actual data source fields used and not
259259
their labels.
260260

261+
You can enable highlighting for clicked events using the
262+
``setHighlight`` method.
263+
264+
.. example::
265+
266+
.. code-block:: sh
267+
:copyable: false
268+
:emphasize-lines: 2
269+
270+
const eventHandler = (payload) => {
271+
chart.setHighlight(payload.selectionFilter);
272+
};
273+
274+
chart.render(container).then(() => {
275+
chart.addEventListener('click', eventHandler);
276+
});
277+
278+
To learn more, see :ref:`highlight-chart-elements`.
279+
261280
On an embedded chart that includes event handlers with a filter for
262281
element roles, the chart shows:
263282

0 commit comments

Comments
 (0)