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

Appearance settings

Commit 771d584

Browse filesBrowse files
authored
Add crosstalk mapping to computed_mapping (not mapping) when present (#1964)
* Follow up to #1952: add crosstalk mapping to computed_mapping (not mapping) when present * use dev version; update news
1 parent 9fe33eb commit 771d584
Copy full SHA for 771d584

File tree

Expand file treeCollapse file tree

3 files changed

+14
-3
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+14
-3
lines changed

‎DESCRIPTION

Copy file name to clipboardExpand all lines: DESCRIPTION
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: plotly
22
Title: Create Interactive Web Graphics via 'plotly.js'
3-
Version: 4.9.4
3+
Version: 4.9.4.9000
44
Authors@R: c(person("Carson", "Sievert", role = c("aut", "cre"),
55
email = "cpsievert1@gmail.com", comment = c(ORCID = "0000-0002-4958-2844")),
66
person("Chris", "Parmer", role = "aut",

‎NEWS.md

Copy file name to clipboardExpand all lines: NEWS.md
+7-1Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
1+
# 4.9.4.9000
2+
3+
## BUG FIXES
4+
5+
* Fixes a bug in `ggplotly()` with `{crosstalk}` and `{ggplot2}` v3.3.4 (#1952).
6+
17
# 4.9.4
28

39
## BUG FIXES
410

511
* Duplicate `highlight(selectize=T)` dropdowns are no longer rendered in Shiny (#1936).
612
* `group_by.plotly()` now properly retains crosstalk information across `{dplyr}` versions (#1920).
7-
* Adds fixes in `ggplotly()` for the upcoming `{ggplot2}` >3.3.3 release (#1952).
13+
* Adds fixes in `ggplotly()` for the upcoming `{ggplot2}` v3.3.4 release (#1952).
814
* Fixes some issues with `name` and `frames` when both attributes are specified. (#1903 and #1618).
915

1016
# 4.9.3

‎R/ggplotly.R

Copy file name to clipboardExpand all lines: R/ggplotly.R
+6-1Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,12 @@ gg2list <- function(p, width = NULL, height = NULL,
264264
layers <- Map(function(x, y) {
265265
if (crosstalk_key() %in% names(y) && !"key" %in% names(x[["mapping"]]) &&
266266
inherits(x[["stat"]], "StatIdentity")) {
267-
x[["mapping"]] <- c(x[["mapping"]], key = as.name(crosstalk_key()))
267+
# ggplot2 v3.3.4 started using the computed_mapping (instead of mapping)
268+
# field to inform the compute_aesthetics() method, so in order to add
269+
# the crosstalk key, we need to add to that field (when present)
270+
# https://github.com/tidyverse/ggplot2/pull/4475
271+
nm <- if ("computed_mapping" %in% names(x)) "computed_mapping" else "mapping"
272+
x[[nm]] <- c(x[[nm]], key = as.name(crosstalk_key()))
268273
}
269274
x
270275
}, layers, layer_data)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.