Open
Description
Issue
transforms
filter plus color/symbol mapping seems to break the transforms
filter.
Reprex
Sample data
df <- data.frame(
x = c(1:10, 1:10),
y = c(1:10, 10:1),
z = c(rep("up", 10), rep("down", 10)))
The idea is to only show data where z = "up"
through a transforms
filter.
Case 1: transforms
filter without color mapping
This works
plot_ly(
df,
x = ~x, y = ~y, text = ~z,
type = "scatter", mode = "markers+text",
marker = list(size = 10, opacity = 0.8),
transforms = list(
list(
type = "filter",
target = ~z,
operation = "=",
value = "up")))
Case 2: transforms
filter with color mapping
This does not work
plot_ly(
df,
x = ~x, y = ~y, text = ~z, color = ~z,
type = "scatter", mode = "markers+text",
marker = list(size = 10, opacity = 0.8),
transforms = list(
list(
type = "filter",
target = ~z,
operation = "=",
value = "up")))
Summary
In both cases the transforms
filter is the same and should select only those entries where z = "up"
; however, when a color (or symbol) mapping is added, for some reason only entries where z = "down"
are shown.