I would like to make box plot using crosstalk
, ggplot2
and plotly
. But I encountered 2 issues:
the fill color is lost in the box plot
I cannot remove the
All
option in the dropdown menu.
Below is my demo code.
Thanks a lot for your help.
sd = SharedData$new(mpg)
# Create a filter input
continent_filter = filter_select(id = "Year", label = "Year", sharedData = sd, group = ~ year, multiple = F)
# Render graph
bscols(
continent_filter,
ggplotly(
ggplot(aes(y = hwy, x = manufacturer, group = year), data = sd) +
geom_boxplot(aes(fill = manufacturer)), tooltip = NULL
),
widths = 12
)