-
Notifications
You must be signed in to change notification settings - Fork 793
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Composing Multiple Selections #1704
Comments
Bitwise operators are supported for selections: e.g. |
|
Wow! Thats neat! Hidden beauty! |
Great! Is there any place in the docs we could add this that you might have found before asking the question? |
I guess here: https://altair-viz.github.io/user_guide/interactions.html#selection-types-interval-single-multi. morgan = alt.selection_interval(
on="[mousedown[event.shiftKey], mouseup] > mousemove",
translate="[mousedown[event.shiftKey], mouseup] > mousemove",
mark={"fill": "#fdbb84", "fillOpacity": 0.5, "stroke": "#e34a33"},
name='morgan'
) is a bit verbose. |
What is the best approach for combining multiple selections in Altair?
In Vega-Lite this is described as such for a combined conditioned color selection:
And I can create a working example similar to the Vega-Lite docs as such in Altair:
But it doesn't feel very pythonic.
I saw there is an
alt.SelectionAnd()
function, but I don't know how it should work. I triedalt.SelectionAnd([alex.name, morgan.name])
, but this returns:Some help, advice or insight is appreciated.
(I'm also not sure if the
on
andtranslate
within thealt.selection_interval()
function should be like this in Altair)The text was updated successfully, but these errors were encountered: