You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/dashboards/_learning-more.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,10 +4,10 @@
4
4
5
5
[Examples](examples/index.qmd) provides a gallery of example dashboards you can use as inspiration for your own.
6
6
7
-
[Theming](theming.qmd) describes the various way to customized the fonts, colors, layout and other aspects of dashboard apperance.
7
+
[Theming](theming.qmd) describes the various way to customize the fonts, colors, layout and other aspects of dashboard appearance.
8
8
9
9
[Parameters](parameters.qmd) explains how to create dashboard variants by defining parameters and providing distinct values for them on the command line.
10
10
11
-
[Deployment](deployment.qmd) covers how to deploy both static dashboards (which do not require a server but rather only a web host) and Shiny dashboards (which require a Shiny Server).
11
+
[Deployment](deployment.qmd) covers how to deploy both static dashboards (which require only a web host, but not a server) and Shiny dashboards (which require a Shiny Server).
12
12
13
13
Interactive dashboards are covered in the articles on using [Shiny for Python](interactivity/shiny-python/index.qmd), [Shiny for R](interactivity/shiny-r.qmd), and [Observable JS](interactivity/observable.qmd).
Copy file name to clipboardExpand all lines: docs/dashboards/components.qmd
+41-44Lines changed: 41 additions & 44 deletions
Original file line number
Diff line number
Diff line change
@@ -9,9 +9,9 @@ Dashboards are compositions of components used to provide navigation and present
9
9
10
10
## Navigation
11
11
12
-
All dashboards include a top-level navigation bar that provide a title and (optionally) a logo and author. Dashboards with multiple pages also contain a link to each page on the navigation bar:
12
+
All dashboards include a top-level navigation bar that provide a title and (optionally) a logo and author. Dashboards with [multiple pages](#pages) also contain a link to each page on the navigation bar:
13
13
14
-

14
+
{fig-alt="Screenshot of a dashboard navigation bar. The bar begins with a logo of three penguins, then the title Palmer Penguins followed by the author Cobblepot Analytics. There are also three links to pages: Bills, Flippers and Data."}
15
15
16
16
The `title` and `author` are specified as they are with normal documents. You can also include a `logo` and one or more `nav-buttons`:
17
17
@@ -66,23 +66,20 @@ format: dashboard
66
66
:::
67
67
68
68
::: g-col-7
69
-

69
+
{fig-alt="A schematic of a page layout showing Chart 1 at the top using the full page width, then Chart 2 and Chart 3 side by side in a row below it."}
70
70
:::
71
71
:::
72
72
73
-
Here, level 2 markdown headings (e.g. `## Row {height=70%}`) define the contents of rows as well as their relative height. The ```` ```{python} ```` code cells in turn automatically create cards that are laid out in columns within the row.
73
+
Here, level 2 markdown headings (e.g. `## Row {height=70%}`) define the contents of rows as well as their relative height. The ```` ```{python} ```` code cells in turn automatically create cards that are laid out in columns within the row.
74
74
75
-
### Fill vs. Flow
76
75
77
-
Each row in your dashboard that is not given an explicit height will determine its size by either filling available space or by flowing to its natural height. Filling layout is generally the default, however for certain types of content (e.g. markdown text) flow layout is the default.
76
+
::: {.callout-note}
78
77
79
-
If the default behavior isn't what you want, you can explicitly specify filling or flowing behavior usign the `.fill` and `.flow` classes applied to a row. For example:
78
+
## Heading text isn't required
80
79
81
-
````{.python .pymd}
82
-
## Row {.fill}
80
+
Although markdown headings are used to define the layout of rows and columns in Quarto dashboards, the heading text itself is discarded. We use the headings `Row` and `Column` in these docs to aid understanding of the layouts, but you can use more descriptive headings if they help you navigate your source code.
83
81
84
-
## Row {.flow}
85
-
````
82
+
:::
86
83
87
84
### Orientation
88
85
@@ -114,10 +111,24 @@ format:
114
111
:::
115
112
116
113
::: g-col-7
117
-

114
+
{fig-alt="A schematic of a page layout showing Chart 1 on the left using the full page height, and on the right Chart 2 and Chart 3 are one above the other."}
118
115
:::
119
116
:::
120
117
118
+
### Fill vs. Flow
119
+
120
+
Each row in your dashboard that is not given an explicit height will determine its size by either filling available space or by flowing to its natural height. Filling layout is generally the default, however for certain types of content (e.g. markdown text) flow layout is the default.
121
+
122
+
If the default behavior isn't what you want, you can explicitly specify filling or flowing behavior usign the `.fill` and `.flow` classes applied to a row. For example:
123
+
124
+
````{.python .pymd}
125
+
## Row {.fill}
126
+
127
+
## Row {.flow}
128
+
````
129
+
130
+
131
+
121
132
### Scrolling
122
133
123
134
By default, dashboard content fills all available space in the page. You can alternatively specify the `scrolling: true` option to layout content using its natural height and scroll to accommodate page overflow. For example:
@@ -144,7 +155,7 @@ format:
144
155
:::
145
156
146
157
::: g-col-7
147
-

158
+
{fig-alt="A schematic of a dashboard layout showing three charts stacked vertically."}
148
159
:::
149
160
:::
150
161
@@ -154,7 +165,7 @@ The article on [Dashboard Layouts](layouts.qmd) provides extensive additional ex
154
165
155
166
## Pages {#pages}
156
167
157
-
The layout examples above demonstrated only single-page dashboards. To introduce multiple pages, use level 1 headings above the level 2 headings used to define rows and columns. For example, here is a dashboard that splits content across two pages:
168
+
The layout examples above demonstrated only single-page dashboards. To introduce multiple pages, use level 1 headings above the level 2 headings used to define rows and columns. The text of the level 1 headings will be used to link to the pages in the navigation bar. For example, here is a dashboard that splits content across two pages:
158
169
159
170
````{.python .pymd}
160
171
---
@@ -187,7 +198,7 @@ Note that we can set a per-page orientation by adding an `orientation` attribute
187
198
188
199
## Tabsets {#tabsets}
189
200
190
-
Use tabsets to include multiple views of data or to include content of secondary importance without having it crown the main display. Tabsets are created by adding the `.tabset` class to a row or column. For example, this layout displays the bottom row as a set of two tabs.
201
+
Use tabsets to include multiple views of data or to include content of secondary importance without having it crowd the main display. Tabsets are created by adding the `.tabset` class to a row or column. For example, this layout displays the bottom row as a set of two tabs.
191
202
192
203
::: {.chart-example .grid}
193
204
::: g-col-5
@@ -215,11 +226,11 @@ format: dashboard
215
226
:::
216
227
217
228
::: g-col-7
218
-

229
+
{fig-alt="Schematic of a dashboard layout showing Chart 1 at the top using the full page width. Below Chart 1, a panel with two tabs is shown: the Chart 2 tab is selected and occupies the full page width; the Chart 3 tab is unselected."}
219
230
:::
220
231
:::
221
232
222
-
You can include tabsets at arbitrarily deep levels. Here we include a tabset within a column of a top level row. Each cell within the tabset column becomes a tab.
233
+
You can include tabsets at arbitrarily deep levels. Here we include a tabset within a column of a top level row:
223
234
224
235
::: {.chart-example .grid}
225
236
::: g-col-5
@@ -254,21 +265,21 @@ format: dashboard
254
265
:::
255
266
256
267
::: g-col-7
257
-

268
+
{fig-alt="Schematic of a dashboard layout showing Chart 1 at the top using the full page width. The row below Chart 1 is split into two columns. In the left column is a panel with two tabs: Chart 2 and Chart 3. In the right column is Chart 4."}
258
269
:::
259
270
:::
260
271
261
-
We provide navigational titles for our tabs by adding a `title` option to the cell used to produce each tab.
272
+
Each cell within the tabset column becomes a tab, and we provide navigational titles for our tabs by adding a `title` option to the cell used to produce each tab.
262
273
263
-
Note that you can also have tabs that contain only markdown. To do this use a `::: {.card}` div and include a `title` attribute for the tab:
274
+
You can also have tabs that contain only markdown. To do this use a `::: {.card}` div and include a `title` attribute for the tab:
264
275
265
276
````python
266
277
::: {.card title="My Title"}
267
278
Card text
268
279
:::
269
280
````
270
281
271
-
In the examples above, each tab include a single card. If you want tabs to contain multiple cards, you can introduce another level of tab headings, each of which can contain multiple cards. For example:
282
+
In the examples above, each tab included a single card. If you want tabs to contain multiple cards, introduce another level of headings below the tabset row or column. For example:
272
283
273
284
````{.python .pymd}
274
285
---
@@ -323,23 +334,23 @@ This text will be displayed within a card
323
334
```
324
335
````
325
336
326
-
Note that if you want to provide a title for a markdown card use the `title` attribute. For example:
337
+
To provide a title for a markdown card use the `title` attribute. For example:
327
338
328
339
````python
329
340
::: {.card title="My Title"}
330
341
This text will be displayed within a card
331
342
:::
332
343
````
333
344
334
-
Note that if you are authoring within a Jupyter Notebook then markdown cells automatically become `.content` divs.
345
+
Note that if you are authoring within a Jupyter Notebook then markdown cells automatically become `.card` divs.
335
346
336
-
In the section on [Cell Output](data-presentation.qmd#cell-output) there are additional details on how cells and their content are mapped to cards (e.g. excluding cells, cells with multiple outputs, etc.).
347
+
For additional details on how cells and their content are mapped to cards (e.g. excluding cells, cells with multiple outputs, etc.), see [Cell Output](data-presentation.qmd#cell-output).
337
348
338
349
### Display Options
339
350
340
351
By default, cards are displayed with no title and a small bit of padding around the edges. Here is a card that displays a [Leaflet](https://ipyleaflet.readthedocs.io) map:
341
352
342
-

353
+
{fig-alt="Screenshot of a map inset from a light grey border around the card."}
343
354
344
355
You can add a title to a card by including the `title` cell option. You can also customize the padding using the `padding` option. For example, here we add a title and remove the padding entirely:
{fig-alt="Screenshot of a card with the title World Map displayed in the light grey bar at the top. The card contains a map with no inset from the card border."}
357
368
358
-
You can create a dynamic `title` by printing a `title=` expression as a cell's first output. For example:
359
369
360
-
````{.python .pymd}
361
-
```{{python}}
362
-
from ipyleaflet import Map, basemaps, basemap_to_tiles
Note that for R you would use the `cat()` rather than `print()` function.
370
+
You can create a dynamic `title` by printing a `title=` expression as a cell's first output. For example:
375
371
372
+
{{< include _dynamic-title.md >}}
376
373
377
374
#### Expanding Cards
378
375
379
376
By default, you can zoom in on the content of cards using the expand button in the bottom right:
380
377
381
-

378
+
{fig-alt="Screenshot of a card with the cursor hovering over an icon in the bottom right showing the pop up text Expand."}
382
379
383
380
If you don't want cards to be expandable you can specify `expandable: false` (either at the document level or for individual cards).
384
381
@@ -410,7 +407,7 @@ format: dashboard
410
407
:::
411
408
412
409
::: g-col-7
413
-

410
+
{fig-alt="Schematic of a dashboard layout showing a sidebar as grey column on the left filling the page height. On the left, Chart 1 and Chart 2 are one above the other."}
0 commit comments