question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Revise whether to blend selection into parameter

See original GitHub issue

As I start working on documentation, I start questioning whether this is a good idea.

At the conceptual level, selection seems to be a distinct concept from parameter as there are several commands that only work with selections:

transform": [
      {"filter": {"selection": "brush"}}
    ]
"scale": {"domain": {"selection": "brush", "encoding": "x"}}
"selection": {"or": ["alex", {"not": "morgan"}]}

For this reason, it might make sense that we keep selection as a separate thing, but mention that declaring a selection will also produce a parameter that can be referred.

(We should still consider consolidating point selection and changing selection from key-value object to a flat object with names so it’s consistent with parameters.)

Also, we should consider if we want selections: or selection: as the key. (Right now we use params:, but if we want to keep selection:, then we should rename params to a singular parameter:.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
kanitwcommented, Jan 19, 2021

We have now found a way to cleanly unify them (by making params works in place that selection used to work with boolean coercion).

0reactions
domoritzcommented, Jan 11, 2021

I think there is value in merging selections and params. Besides what @arvind wrote above, I think there is enough commonality (especially to a user) that the two should not be separate. For example, both are implemented with signals and both can (or will be) readable/writable from the outside. At some point Vega will support selections and then we might have to adjust things here in Vega-Lite as well but until then I think we should move forward with what we have.

Side note. To me, the selection in the code below is just a shortcut for an expression that correctly handles the fact that a selection (which can be more than a single value).

transform": [
      {"filter": {"selection": "brush"}}
    ]
Read more comments on GitHub >

github_iconTop Results From Across the Web

Change filter based on parameter while using blending
I want filter to be changed based on my selection on parameter. For example I have State and City option in parameter, so...
Read more >
Blend Method - Synfig Animation Studio
By default, "Blend Method" parameter is Static. To animate it over the time, right click on it and choose "Enable animation".
Read more >
Creating a Dynamic “Parameter” with a Tableau Data Blend
Currently (July 2013), the #1 most-voted-for Idea for Tableau is Dynamic Parameters. Here, I'll show you a technique for using Tableau data ...
Read more >
Parameters - Looker Studio Help - Google Help
Parameters let you interact with user-provided data. For example, you can create calculated fields that include input from people using your report, ...
Read more >
Select and Mask workspace - Adobe Support
Learn how to use the dedicated Select and Mask workspace in Photoshop. ... Output To: Determines whether the refined selection becomes a ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found