File tree Expand file tree Collapse file tree 2 files changed +5
-54
lines changed Expand file tree Collapse file tree 2 files changed +5
-54
lines changed Original file line number Diff line number Diff line change @@ -625,7 +625,7 @@ gg2list <- function(p) {
625625
626626 # Legend.
627627 layout $ margin $ r <- 10
628- if (exists(" increase_margin_r" , where = as.environment( " package:plotly " ) )) {
628+ if (exists(" increase_margin_r" )) {
629629 layout $ margin $ r <- 60
630630 }
631631 layout $ legend <- list (bordercolor = " transparent" ,
@@ -666,10 +666,11 @@ gg2list <- function(p) {
666666 legend.title <- colnames(p $ data )[i ]
667667 }
668668 legend.title <- paste0(" <b>" , legend.title , " </b>" )
669+
669670 # Create legend title element as an annotation
670- if (exists(" annotations" , where = as.environment( " package:plotly " ) )) {
671- nann <- nann + 1
672- } else {
671+ if (exists(" annotations" )) {
672+ nann <- nann + 1
673+ } else {
673674 annotations <- list ()
674675 nann <- 1
675676 }
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments