We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm attempting to replace a customized plotly barchart with one using billboarder.
plotly
billboarder
The customizations I am looking for:
cat_2
Here's a repress for my Plotly chart:
library(plotly) library(dplyr) dt <- tibble( cat_1 = c("apple", "banana", "apple", "banana"), cat_2 = c("store 1", "store 1", "store 2", "store 2"), custom_hover_text = c("Hover 1", "Hover 1", "Hover 2", "Hover 2"), some_value = c(4, 5, 2, 3) ) dt <- dt %>% dplyr::group_by(cat_2) %>% dplyr::mutate(totals_for_the_label = sum(some_value)) %>% dplyr::ungroup() dt plotly::plot_ly(data = dt) %>% plotly::add_bars( x = ~ cat_2, y = ~ some_value, color = ~ cat_1, colors = c(`apple` = "#118ab2", `banana` = "#ffd166"), hoverinfo = "text", hovertext = ~ glue::glue("{custom_hover_text} : {cat_2} is {some_value}") ) %>% plotly::layout(barmode = "stack") %>% plotly::add_text( text = ~ totals_for_the_label, x = ~ cat_2, y = ~ totals_for_the_label, textposition = "top middle", cliponaxis = FALSE, inherit = FALSE, hoverinfo = "none", showlegend = FALSE )
Is this possible with billboarder ?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'm attempting to replace a customized
plotly
barchart with one usingbillboarder
.The customizations I am looking for:
cat_2
Here's a repress for my Plotly chart:
Is this possible with
billboarder
?The text was updated successfully, but these errors were encountered: