Skip to content

Commit 8d82338

Browse files
committed
Add some missing key attributes in ggplotly()
1 parent 5e0ad36 commit 8d82338

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

R/layers2traces.R

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,7 @@ geom2trace.GeomPath <- function(data, params, p) {
376376
x = data$x,
377377
y = data$y,
378378
text = data$hovertext,
379+
key = data$key,
379380
type = "scatter",
380381
mode = "lines",
381382
name = if (inherits(data, "GeomSmooth")) "fitted values",
@@ -433,6 +434,7 @@ geom2trace.GeomBar <- function(data, params, p) {
433434
x = data$x,
434435
y = data$y,
435436
text = data$hovertext,
437+
key = data$key,
436438
type = "bar",
437439
marker = list(
438440
autocolorscale = FALSE,
@@ -455,6 +457,7 @@ geom2trace.GeomPolygon <- function(data, params, p) {
455457
x = data$x,
456458
y = data$y,
457459
text = data$hovertext,
460+
key = data$key,
458461
type = "scatter",
459462
mode = "lines",
460463
line = list(
@@ -515,6 +518,7 @@ geom2trace.GeomText <- function(data, params, p) {
515518
x = data$x,
516519
y = data$y,
517520
text = data$label,
521+
key = data$key,
518522
textfont = list(
519523
# TODO: how to translate fontface/family?
520524
size = aes2plotly(data, params, "size"),

0 commit comments

Comments
 (0)