Skip to content

Commit

Permalink
fix to show_sedimentalratio legend to remove extra text
Browse files Browse the repository at this point in the history
  • Loading branch information
fawda123 committed Dec 6, 2023
1 parent a71e95d commit 2161bb2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: tbeptools
Title: Data and Indicators for the Tampa Bay Estuary Program
Version: 2.0.1.9013
Date: 2023-09-14
Version: 2.0.1.9014
Date: 2023-12-06
Authors@R: c(
person(given = "Marcus",
family = "Beck",
Expand Down
10 changes: 9 additions & 1 deletion R/show_sedimentalratio.R
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,8 @@ show_sedimentalratio <- function(sedimentdata, param, yrrng = c(1993, 2021), bay
}

# plotly
if(plotly)
if(plotly){

p <- plotly::ggplotly(p, width = width, height = height) %>%
plotly::config(
toImageButtonOptions = list(
Expand All @@ -182,6 +183,13 @@ show_sedimentalratio <- function(sedimentdata, param, yrrng = c(1993, 2021), bay
)
)

# remove extra text from legend
for(i in 1:length(p$x$data)){
p$x$data[[i]]$name <- gsub('^\\(|,1,NA\\)$|,1\\)$', '', p$x$data[[i]]$name)
}

}

return(p)

}

0 comments on commit 2161bb2

Please sign in to comment.