-
Notifications
You must be signed in to change notification settings - Fork 632
include boxmode as valid attr #2396
New issue
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
include boxmode as valid attr #2396
Conversation
@cpsievert @KasperSkytte
Please could this change be reviewed and included?
It is a real pain to have this unnecessary warning appearing all the time.
Yes, sorry, would you mind adding a NEWS.md
item as well? Thanks!
Thanks! I've added this to the development version section of the News.md file. Hopefully that's as expected.
Thank you! Does this also avoid the warning that is send for the related boxgroupgap
option for layout, and, similarly, boxgap
for non-grouped boxplots? This is also an issue with barplots (type='bar'
), where bargroupgap
also trigger an unwarranted warning.
This is also mentioned #1956 and #2406 .
Reproducible example for simple boxplots and grouped barplots shown below:
library(plotly)
fig <- plot_ly(ggplot2::diamonds, x = ~cut, y = ~price, type = "box")
fig <- fig %>% layout(boxgap = 0.8)
fig
library(plotly)
library(dplyr)
fig <- plot_ly(ggplot2::diamonds %>% count(cut, clarity), x = ~cut, y = ~n, color = ~clarity, type='bar')
fig %>% layout(bargroupgap = 0.5)
No, do you want to submit a PR?
Fix for #2376 and #994.
Simply adds boxmode as a valid attribute option in the attrs_name_check function of utils.R.
Warning no longer appears for boxmode option.
Tests run without error or warning.
@cpsievert @KasperSkytte