Skip to content

Default to span=I(1) if stroke is user-specified #1508

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

Merged
merged 2 commits into from
Apr 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions R/plotly_build.R
Original file line number Diff line number Diff line change
Expand Up @@ -1026,6 +1026,11 @@ has_fill <- function(trace) {
# ensure we've set a sensible trace defaults
# based on the trace type
coerce_attr_defaults <- function(trace, layout) {
# if user has specified stroke, make sure the span
# defaults to something greater than 0 (so they can see the stroke!)
if (length(trace[["stroke"]]) && !is.default(trace[["stroke"]])) {
trace$span <- trace[["span"]] %||% default(I(1))
}
if (trace[["type"]] %in% c("sunburst", "pie")) {
# As of v1.46.1, paper_bgcolor defaults to '#fff' which
# col2rgb() can't parse, but expands to '#ffffff'
Expand Down
2 changes: 1 addition & 1 deletion tests/figs/colorscales/contour-alpha.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion tests/figs/plotly-color/plotly-color-box-color-stroke.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.