1

我从https://plotly-r.com/client-side-linking.html遵循图 16.7 的示例,但无法弄清楚为什么有一个名为“(全部)”的选择或如何删除它。

这里的样子

我使用的代码如下

library(plotly)
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)
)

谢谢您的帮助!

4

0 回答 0