Skip to content

Commit cb2fdfa

Browse files
committed
more careful logic for inferring data variables. fixes #712
1 parent 3b3eb61 commit cb2fdfa

File tree

2 files changed

+85
-73
lines changed

2 files changed

+85
-73
lines changed

R/add.R

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,17 @@ add_trace_classed <- function(p, class = "plotly_polygon", ...) {
451451
p
452452
}
453453

454+
# retrieve the non-plotly.js attributes for a given trace
455+
special_attrs <- function(trace) {
456+
switch(
457+
class(trace)[[1]],
458+
plotly_area = c("ymax"),
459+
plotly_segment = c("xend", "yend"),
460+
plotly_ribbon = c("ymin", "ymax")
461+
)
462+
}
463+
464+
454465

455466
# #'
456467
# #'

0 commit comments

Comments
 (0)