library(plotly)
## Loading required package: ggplot2
##
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
##
## last_plot
## The following object is masked from 'package:stats':
##
## filter
## The following object is masked from 'package:graphics':
##
## layout
library(crosstalk)
data(txhousing, package = "ggplot2")
tx <- highlight_key(txhousing)
gg <- ggplot(tx) + geom_line(aes(date, median, group = city))
filter <- bscols(
filter_select("id", "Select a city", tx, ~city),
ggplotly(gg, dynamicTicks = TRUE),
widths = c(12, 12)
)
## Warning in bscols(filter_select("id", "Select a city", tx, ~city),
## ggplotly(gg, : Sum of bscol width units is greater than 12
filter