Closed
Description
When using with crosstalk, plotly generates "new" data point on the scatter plot after selecting and deselecting.
First plot a scatter plot with plotly and crosstalk.
Then highlight some points by selecting them.
Double click anywhere to deselect. Then these's a "new" data point shows at the lower left corner.
If I set color = I("black")
, everything works fine.
R 3.4.1, plotly 4.8.0, crosstalk 1.0.0, macOS High Sierra 10.13.6.
library(plotly)
library(crosstalk)
library(tidyverse)
m <- mtcars %>% tibble::rownames_to_column()
d <- SharedData$new(m, ~rowname)
plot_ly(d, x = ~mpg, y = ~disp, color = ~cyl, type="scatter", mode = "markers") %>%
highlight(on="plotly_selected", off="plotly_deselect")