Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit a1c3089

Browse files
authored
Fix rstudio windows warning (#2300)
Co-authored-by: Sergio Oller <Sergio.OllerMoreno@almirall.com>
1 parent 50c50ea commit a1c3089

File tree

3 files changed

+3
-21
lines changed

3 files changed

+3
-21
lines changed

‎NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
* Closed #1947: `ggplotly()` now correctly handles `geom_vline`/`geom_hline` with empty data. Previously, if `geom_vline`/`geom_hline` was passed an empty data frame, it would result in an error. The plot is drawn even if no lines are found; this is the same behavior as `ggplot2`.
66

7+
* Closed #1214: Do not warn in RStudio on Windows when scattergl is used. Recent RStudio versions can render scattergl correctly.
8+
79
# 4.10.2
810

911
## New features

‎R/plotly_build.R

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -395,11 +395,7 @@ plotly_build.plotly <- function(p, registerFrames = TRUE) {
395395

396396
# if a partial bundle was specified, make sure it supports the visualization
397397
p <- verify_partial_bundle(p)
398-
399-
# scattergl currently doesn't render in RStudio on Windows
400-
# https://github.com/ropensci/plotly/issues/1214
401-
p <- verify_scattergl_platform(p)
402-
398+
403399
# make sure plots don't get sent out of the network (for enterprise)
404400
p$x$base_url <- get_domain()
405401
p

‎R/utils.R

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -948,22 +948,6 @@ verify_mathjax <- function(p) {
948948
p
949949
}
950950

951-
verify_scattergl_platform <- function(p) {
952-
if (!identical(.Platform$OS.type, "windows")) return(p)
953-
if (!is_rstudio()) return(p)
954-
955-
types <- vapply(p$x$data, function(x) x[["type"]] %||% "scatter", character(1))
956-
if ("scattergl" %in% types) {
957-
warning(
958-
"'scattergl' trace types don't currently render in RStudio on Windows. ",
959-
"Open in another web browser (IE, Chrome, Firefox, etc).",
960-
call. = FALSE
961-
)
962-
}
963-
964-
p
965-
}
966-
967951
has_marker <- function(types, modes) {
968952
is_scatter <- grepl("scatter", types)
969953
ifelse(is_scatter, grepl("marker", modes), has_attr(types, "marker"))

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /