Skip to content

Commit bcae42b

Browse files
committed
Add support for new plotly_sunburstclick event, closes #1648
1 parent 290c8ef commit bcae42b

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

R/shiny.R

+4-2
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,8 @@ event_data <- function(
117117
"plotly_hover", "plotly_unhover", "plotly_click", "plotly_doubleclick",
118118
"plotly_selected", "plotly_selecting", "plotly_brushed", "plotly_brushing",
119119
"plotly_deselect", "plotly_relayout", "plotly_restyle", "plotly_legendclick",
120-
"plotly_legenddoubleclick", "plotly_clickannotation", "plotly_afterplot"
120+
"plotly_legenddoubleclick", "plotly_clickannotation", "plotly_afterplot",
121+
"plotly_sunburstclick"
121122
),
122123
source = "A",
123124
session = shiny::getDefaultReactiveDomain(),
@@ -252,7 +253,8 @@ shiny_event_defaults <- function() {
252253
"plotly_clickannotation",
253254
"plotly_doubleclick",
254255
"plotly_deselect",
255-
"plotly_afterplot"
256+
"plotly_afterplot",
257+
"plotly_sunburstclick"
256258
)
257259
}
258260

inst/htmlwidgets/plotly.js

+1
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,7 @@ HTMLWidgets.widget({
317317

318318
var eventDataFunctionMap = {
319319
plotly_click: eventDataWithKey,
320+
plotly_sunburstclick: eventDataWithKey,
320321
plotly_hover: eventDataWithKey,
321322
plotly_unhover: eventDataWithKey,
322323
// If 'plotly_selected' has already been fired, and you click

0 commit comments

Comments
 (0)