File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -136,6 +136,10 @@ plotly_build.plotly <- function(p, registerFrames = TRUE) {
136136 trace <- verify_type(trace )
137137 # verify orientation of boxes/bars
138138 trace <- verify_orientation(trace )
139+ # supply sensible defaults based on trace type
140+ trace <- coerce_attr_defaults(trace )
141+
142+
139143
140144 # attach crosstalk info, if necessary
141145 if (crosstalk_key() %in% names(dat ) && isTRUE(trace [[" inherit" ]] %|| % TRUE )) {
@@ -1022,3 +1026,12 @@ has_fill <- function(trace) {
10221026 if (has_fillcolor && isTRUE(fill != " none" )) return (TRUE )
10231027 FALSE
10241028}
1029+
1030+ # ensure we've set a sensible trace defaults
1031+ # based on the trace type
1032+ coerce_attr_defaults <- function (trace ) {
1033+ if (identical(trace [[" type" ]], " sunburst" )) {
1034+ trace $ stroke <- trace [[" stroke" ]] %|| % I(" white" )
1035+ }
1036+ trace
1037+ }
You can’t perform that action at this time.
0 commit comments