Skip to content
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

Merged
merged 2 commits into from
Dec 16, 2024

Conversation

oliver-gray
Copy link
Contributor

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

@oliver-gray
Copy link
Contributor Author

@cpsievert @KasperSkytte
Please could this change be reviewed and included?
It is a real pain to have this unnecessary warning appearing all the time.

@cpsievert
Copy link
Collaborator

Yes, sorry, would you mind adding a NEWS.md item as well? Thanks!

@oliver-gray
Copy link
Contributor Author

Thanks! I've added this to the development version section of the News.md file. Hopefully that's as expected.

@cpsievert cpsievert merged commit aa619dc into plotly:master Dec 16, 2024
@bklingen
Copy link

bklingen commented Dec 16, 2024

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)

@cpsievert
Copy link
Collaborator

No, do you want to submit a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants