Plot out of bounds - bscols + plotly + flexdashboard

I am using crosstalk, plotly and flexdashboard to generate a dashboard, but the filters and the plot in bscols are out of bounds when i knit the rmarkdown.

I tried to control with fig.width, fig.height, out.height, out.width and with pltoly options, but no success.

Any ideias how to change it?

Below an example:

---
title: "Untitled"
output: 
  flexdashboard::flex_dashboard:
    orientation: columns
    vertical_layout: fill
---

```{r setup, include=FALSE}
library(flexdashboard)
library(crosstalk)
library(plotly)
```
Column {data-width=650}
-----------------------------------------------------------------------
### Chart A
```{r test, fig.width=10, fig.height=7, out.height="20%", out.width= "20%"}
base <- mtcars
shared <- SharedData$new(base)
bscols(widths = c(3,NA),
  list(
    filter_select("gear", "Gear", shared, ~gear, multiple = F)
  ), 
  shared |> 
    plot_ly(x=~mpg, y=~hp, type = 'scatter', mode = 'line') |> 
    layout(autosize = F, width = 500, height = 500))
```

Versions:

rmarkdown: 2.24
flexdashboard: 0.6.2
crosstalk: 1.2.0
plotly: 4.10.2
R: 4.1.3 (2022-03-10)

Thanks in advance...

Please format your issue correctly if you want users to chime in and help you.

FAQ: How to Format R Markdown Source

Thank you

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.