I am building a Flexdashboard. On the start page there should be links leading to several hidden storyboard (i.e. so that the storyboards do not show up in the navigation bar at the top).
However, it appears that using {.hidden} on a storyboard page interferes with the navigation captions: only the first caption of three is visible: Screenshot
Using the arrows one can still access all three graphs but without the captions.
Does anybody know how to make hidden storyboard-pages work?
I am using R 4.2.0; Flexdashboard 0.5.2; RStudio 2022.02.1
Reproducible example:
---
title: "Untitled"
output:
flexdashboard::flex_dashboard:
orientation: columns
vertical_layout: fill
---
```{r setup, include=FALSE}
library(flexdashboard)
```
Start page
===========================================================
[Link](#storyboard)
Storyboard{.storyboard .hidden}
===========================================================
### Chart A
```{r}
boxplot(mtcars$mpg)
```
### Chart B
```{r}
boxplot(mtcars$cyl)
```
### Chart C
```{r}
boxplot(mtcars$hp)
```
Related
According to the Quarto docs, the figure below should be screen-width but instead it is just positioned at the left-hand side of the screen. How can I make it bigger? Adding #| layout-ncol: 1 doesn't help either.
---
title: "Test"
format: html
---
```{r}
#| column: screen
plot(pressure)
```
The generated image is not big enough to fill the full screen. Try the out-width parameter to scale the image (docs). For best results, choose a vector-graphic format to ensure smooth scaling of the image.
```{r}
#| column: screen
#| out-width: 100%
#| fig-format: svg
plot(pressure)
```
Actual Behavior - Clipping
I'm using the R DT package with flexdashboard. When I add text to the body of a DT table, the bottom of the dashboard is clipped (to varying extents). See below.
---
title: "With text in the body the bottom is clipped"
output: flexdashboard::flex_dashboard
---
Notice at the bottom that "Showing X entries" and "Previous/Next" are both clipped
```{r}
library(DT)
datatable(mtcars)
```
Expected Behavior - No Clipping
If I remove the text from the body of my table everything behaves as expected. But I want my body text ¯_(ツ)_/¯. What to do?
Is this a bug I should report, or is there another solution I'm unaware of?
---
title: "Without text in the body nothing is clipped"
output: flexdashboard::flex_dashboard
---
```{r}
library(DT)
datatable(mtcars)
```
Version Info:
other attached packages:
[1] DT_0.16 flexdashboard_0.5.2
used this link for intel just adding ### in the chart, helped align the table with Flexdashboard margins
---
title: "With text in the body the bottom is clipped"
output: flexdashboard::flex_dashboard
---
Notice at the bottom that "Showing X entries" and "Previous/Next" are both clipped
###
```{r }
library(DT)
datatable(mtcars)
```
When making an RMarkdown containing tabs, some extra (blank) items appear in the table of contents.
Example
This generates the html doc below
---
output:
html_document:
toc: true
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# First Tabs {.tabset .tabset-fade .tabset-pills}
Text before tabs
## First tab
Content in first tab
## Second tab
Content in second tab
#
# here is another section
Some further content.
Everything is as expected, except there's a blank line in the TOC.
What I've tried
I tried replacing the # that ends the tabbed content with </div> as described here. This causes the TOC to populate correctly, but (strangely) causes the content after the tabs to left-align (no idea why)
For ease of reproducibility, here's the code and a screengrab of the resulting HTML
---
output:
html_document:
toc: true
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# First Tabs {.tabset .tabset-fade .tabset-pills}
Text before tabs
## First tab
Content in first tab
## Second tab
Content in second tab
</div>
# here is another section
Some further content.
As written in the comment: Just remove the single #.
There is also a workaorund, if you have have the following problem
Use TOC
Use Tabs
End tabbed region with further text under the tabbed region
Problem: Normaly use ## to end tabbed region, but this would be another header in the TOC
Solution: ## {.unlisted .unnumbered} will remove the header from TOC.
Example:
---
output:
html_document:
toc: true
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## title {.tabset .tabset-fade}
content above tabbed region.
### tab 1
tab content 1
### tab 2
tab content 2
## {.unlisted .unnumbered}
content below tabbed region
I'm working with R Markdown in a dashboard containing several tabs. In some of those tabs I want to display only an image with a link to a webpage. I managed to do this with this code:
---
title: "MyDashboard"
output:
flexdashboard::flex_dashboard:
orientation: rows
vertical_layout: fill
logo: Logo.png
favicon: Favicon.png
---
```{r setup, include=FALSE}
library(flexdashboard)
```
Row {data-height=350}
-------------------------------------
### THIS TAB CONTAINS NORMAL CONTENT
```{r}
plot(example)
```
Row {data-height=650}
-------------------------------------
### THIS TAB CONTAINS AN IMAGE WITH LINK
```{r}
```
[<img src="image.png" style="width:100%; height=100%">](https://webpage.com/)
This displays the image with the link as expected, but when knitted, the image doesn't adjust to the tab's size and depending on the browser I use, vertical and horizontal scrollbars appear.
I would need to fit the image inside the limits of the tab in every browser I use, but all I tried until now failed.
Any help would be appreciated.
I have these two charts. They are filling up part of the screen.
How do I make them fill the whole screen?
I have it set up with this config code
---
title: "Untitled"
output:
flexdashboard::flex_dashboard:
orientation: columns
vertical_layout: fill
---
And then the charts are defined with this setup
Overview
=====================================
Column
-----------------------------------------------------------------------
chart
Column
-----------------------------------------------------------------------
chart
You can put your plotly object inside the plotly function renderPlotly(). This dynamicalle resizes the graph to the page size. See and example how I used it in this blog post:
https://medium.com/analytics-vidhya/shiny-dashboards-with-flexdashboard-e66aaafac1f2