Skip to content

Commit ec25466

Browse files
DOCSP-2657 - Minor tutorial adjustments for consistency.
1 parent e85d4c3 commit ec25466

22 files changed

+202
-153
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,5 @@ screenshots:
4545
mkdir -p screenshots-temp/charts/
4646
cd build/docs-tools/tools/screenshot-tool && npm install
4747
#node build/docs-tools/tools/screenshot-tool/screenshots.js `pwd`/screenshot-scripts/order-tutorial-dashboard-final.js
48-
node build/docs-tools/tools/screenshot-tool/screenshots.js `pwd`/screenshot-scripts/user-management.js
48+
#node build/docs-tools/tools/screenshot-tool/screenshots.js `pwd`/screenshot-scripts/user-management.js
49+
node build/docs-tools/tools/screenshot-tool/screenshots.js `pwd`/screenshot-scripts/movie-tutorial.js

config/sphinx_local.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ theme:
1616
- /dashboards
1717
- /administration
1818
- /build-charts
19+
- /tutorials
1920
- /tutorial/order-data/order-data-tutorial-overview
2021
- /tutorial/movie-details/movie-details-tutorial-overview
2122
- /chart-types

screenshot-scripts/movie-tutorial.js

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
'use strict';
2+
3+
const screenshotNames = ['movie-tutorial-dashboard-final.png'];
4+
const screenshotDir = './screenshots-temp';
5+
const origImageDir = './source/images/charts';
6+
7+
exports.run = async function (options) {
8+
const nightmare = options.nightmare;
9+
const originalPath = `${origImageDir}/${screenshotNames[0]}`;
10+
const screenshotPath = `${screenshotDir}/${screenshotNames[0]}`;
11+
12+
await nightmare.goto('http://charts.mongodb.parts')
13+
await nightmare.wait('input#email')
14+
await nightmare.type('input#email', '<USERNAME>')
15+
await nightmare.type('input#password', '<PASSWORD>')
16+
await nightmare.click('[data-test-id="login-form-submit-button"]')
17+
await nightmare.wait('a[href="/dashboards"]')
18+
await nightmare.click('a[href="/dashboards"]')
19+
// await nightmare.wait('[class^="Charts_dashboard-overview_list"]')
20+
await nightmare.wait('a[href="/dashboards/983843bf-2aee-4ac1-bf39-37e4814e2fd9"]')
21+
await nightmare.click('a[href="/dashboards/983843bf-2aee-4ac1-bf39-37e4814e2fd9"]')
22+
await nightmare.wait(5000)
23+
await nightmare.screenshot(screenshotPath)
24+
await nightmare.wait(500)
25+
await nightmare.end();
26+
27+
return [[originalPath, screenshotPath]];
28+
}
29+
30+
exports.nightmare_props = {
31+
show: true,
32+
typeInterval: 20,
33+
height: 2000,
34+
width: 1500,
35+
webPreferences: {
36+
zoomFactor: 1.2
37+
}
38+
}
Loading

source/includes/add-data-source-steps.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
Add the Data Collection as a Data Source
2-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3-
41
Now that the data is in the desired collection, add the collection as a
52
:doc:`data source </data-sources>` in |charts|. Adding a
63
collection as a data source links the collection to |charts-short| and

source/includes/steps-column-chart-award-wins.yaml

Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -50,22 +50,29 @@ content: |
5050
operation to return the total number of award wins for each
5151
director.
5252
---
53-
title: Add a query filter.
54-
ref: add-query-filter
53+
title: Apply a limit to the X axis.
54+
ref: add-limit
5555
level: 4
5656
content: |
5757
58-
a. At this point there are too many columns in our X axis to show
59-
any meaningful results. To bring the number down to a manageable
60-
level, add a filter. In the :guilabel:`Filters` box, add the
61-
following query filter and click the :guilabel:`Apply` button:
58+
At this point there are too many columns in our X axis to show any
59+
meaningful results. To bring the number down to a manageable level,
60+
we'll sort the directors by their total number of awards won in
61+
descending order, then apply a :ref:`limit <charts-limit-data>` to get
62+
the top ten:
6263
63-
.. code-block:: javascript
64+
1. In the :guilabel:`X Axis` channel, expand the
65+
:guilabel:`Sort By` dropdown and select
66+
:guilabel:`Aggregated Value`.
6467
65-
{ 'awards.wins': { $gte: 50 } }
68+
#. To order the results in descending order, click the
69+
:guilabel:`AZ` order button located to the right of the
70+
:guilabel:`Sort By` dropdown.
71+
72+
#. Apply a limit to the number of columns in the :guilabel:`X Axis` by
73+
toggling :guilabel:`Limit Results`, then setting :guilabel:`Show`
74+
to ``10``.
6675
67-
This query includes only directors with at least 50 awards. The
68-
chart is now much more legible.
6976
---
7077
title: Group awards by genre.
7178
ref: add-genres
@@ -82,18 +89,6 @@ content: |
8289
shown in the columns may not be the exact number of awards
8390
for each director.
8491
---
85-
title: Sort the data by award wins.
86-
ref: sort-data
87-
level: 4
88-
content: |
89-
a. In the X axis encoding channel, click on the :guilabel:`Sort By`
90-
dropdown menu and select :guilabel:`Aggregated Value` to sort
91-
the columns by the total number of award wins.
92-
93-
#. Switch the sorting order to highest to lowest by clicking the
94-
sort icon in the lower right corner of the X axis encoding
95-
channel panel.
96-
---
9792
title: Title your chart.
9893
ref: bar-chart-add-title
9994
level: 4

source/includes/toc-administration.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ description: |
1212
file: /administration/start-stop-charts
1313
description: |
1414
Instructions for starting and stopping the |charts| application.
15-
...
15+
...

source/includes/toc-tutorials.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
file: /tutorial/order-data/order-data-tutorial-overview
2+
description: |
3+
Create a dashboard to visualize order data from a mock office supply
4+
company. Build charts to gain insight on sales by location, the types
5+
of items sold, and customer demographics.
6+
---
7+
file: /tutorial/movie-details/movie-details-tutorial-overview
8+
description: |
9+
Follow this tutorial to create a dashboard to visualize movie metadata
10+
and viewer rating data. Build charts to gain insight on which
11+
directors won the most awards and how award-nominated movies
12+
correspond to their viewer rating.
13+
...

source/tutorial/movie-details/add-first-chart.txt

Lines changed: 0 additions & 27 deletions
This file was deleted.

source/tutorial/movie-details/add-scatter-chart.txt

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)