Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Widget not displayed properly when wrapped in <details> tags #257

Open
dschulz13 opened this issue Apr 12, 2022 · 0 comments
Open

Widget not displayed properly when wrapped in <details> tags #257

dschulz13 opened this issue Apr 12, 2022 · 0 comments

Comments

@dschulz13
Copy link

dschulz13 commented Apr 12, 2022

dygraphs widgets are not displayed properly when wrapped within <details> tags in HTML document types. The plot titles and labels are shown but the plot window itself is not included. Using the following example as an Rmd file, an HTML file with the described issue can be created.

This issue is similar to the one stated in Issue #793 with regard to the leaflet package.

---
title: "Issue demonstration"
date: "April 12, 2022"
output: html_document
---
  
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```

# Section 1

```{r,  warning = FALSE, message = FALSE}
library(dygraphs)

set.seed(123)
Xt <- ts(rnorm(200), start = c(1980, 1), frequency = 12)

widget <- dygraph(Xt, main = "Plot title", xlab = "Label 1", ylab = "Label 2", width = 800, height = 400) %>%
  dyRangeSelector()
widget
```

Before the ```<details>``` tags, the widget is displayed properly.

<details><summary>Show / hide contents</summary>
<p>

```{r}
widget
```

Inside the ```<details>``` tags, the widget is not displayed properly.

</p>
</details>
  
```{r}
widget
```

After the ```<details>``` tags, the widget is once again displayed properly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant