oneOf on selection
See original GitHub issueHi, I’m trying to adapt the parallel coordinates plot with some interaction. I’ve been working at a minimal example here https://colab.research.google.com/drive/1qMMX5VfFpG0zxBvtHVvxhIS57LHZH_nt?usp=sharing
My goal is to be able to draw a selection box around some of the points and have all the lines/points with the same index be colored and everything else be grayed out. The image below shows that this sort of works, but only because the line is considered selected if its starting point is selected (and subsequent points with same index aren’t selected). It breaks down when you select points in the middle.
The thing I can’t seem to figure out is how to do this: create a brush selection based on the key/value axes -> create a set of index numbers -> set the color condition on these. Any suggestions on how to do this?
I tried using oneOf with something like FieldOneOfPredicate('index', brush.index)
, but get the feeling this isn’t valid and its expected that the list of options is a static list. The only approach I can think of so far that might work is having a shadow set of points + transform_filters that create colored/non-colored sets of points/lines, which seems a bit messy. Thanks!
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (4 by maintainers)
Top GitHub Comments
No, I don’t know of any really good guide unfortunately. The API reference here is probably the most helpful thing: https://vega.github.io/vega/docs/expressions/
Closing for now, please reopen if there is anything that wasn’t resolved solutions provided above.