Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add thematic to suggests and use it only when loaded
  • Loading branch information
cpsievert committed Jun 25, 2020
commit 9c864d617dddf35d898285ab4d5d850e395e4367
4 changes: 3 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,10 @@ Suggests:
IRdisplay,
processx,
plotlyGeoAssets,
forcats
forcats,
thematic
LazyData: true
RoxygenNote: 7.1.0
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
Remotes: rstudio/thematic
4 changes: 2 additions & 2 deletions R/ggplotly.R
Original file line number Diff line number Diff line change
Expand Up @@ -424,8 +424,8 @@ gg2list <- function(p, width = NULL, height = NULL,
}

# Allow thematic to add new defaults to the plot object based on it's theme
ggthematic_build <- getFromNamespace("ggthematic_build", "thematic")
built <- if (is.function(ggthematic_build)) {
built <- if (isNamespaceLoaded("thematic")) {
ggthematic_build <- getFromNamespace("ggthematic_build", "thematic")
ggthematic_build(p, ggplotly_build, thematic::thematic_get_theme(resolve = TRUE))
} else {
ggplotly_build(p)
Expand Down