Skip to content

Commit 5b1f69c

Browse files
authored
Merge pull request #1508 from ropensci/span
Default to span=I(1) if stroke is user-specified
2 parents e6e5d0f + 1ca2fe0 commit 5b1f69c

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

R/plotly_build.R

+5
Original file line numberDiff line numberDiff line change
@@ -1026,6 +1026,11 @@ has_fill <- function(trace) {
10261026
# ensure we've set a sensible trace defaults
10271027
# based on the trace type
10281028
coerce_attr_defaults <- function(trace, layout) {
1029+
# if user has specified stroke, make sure the span
1030+
# defaults to something greater than 0 (so they can see the stroke!)
1031+
if (length(trace[["stroke"]]) && !is.default(trace[["stroke"]])) {
1032+
trace$span <- trace[["span"]] %||% default(I(1))
1033+
}
10291034
if (trace[["type"]] %in% c("sunburst", "pie")) {
10301035
# As of v1.46.1, paper_bgcolor defaults to '#fff' which
10311036
# col2rgb() can't parse, but expands to '#ffffff'

tests/figs/colorscales/contour-alpha.svg

+1-1
Loading
Loading

0 commit comments

Comments
 (0)