Skip to content
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

Add peers attribute to toggle interactor #164

Merged
merged 3 commits into from
Sep 22, 2023

Conversation

spren9er
Copy link
Contributor

@spren9er spren9er commented Sep 1, 2023

Why is this pull request necessary?

Currently, a toggle interactor — interacting with one mark — will filter out data of other marks in same plot, when used with cross-filter selection.

What does this pull request cover?

  • Add peers attribute to toggle interactor (analog to interval interactors)
  • Update highlight-toggle.yaml example, which uses now peers attribute under the hood to show all text labels when toggling (before, it showed only labels for selected bars)
  • Update documentation of toggle interactor

export function toggleX({ as }) {
return toggle({ as, channels: ['x'] });
export function toggleX({ as, ...rest }) {
return toggle({ as, ...rest, channels: ['x'] });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can simplify the signature and implementation to:

export function toggleX(options) {
  return toggle({ ...options, channels: ['x'] });
}

...and similarly for the other modified toggle methods.

Copy link
Member

@jheer jheer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks good, but we should simplify the toggle function signatures.

@spren9er spren9er requested a review from jheer September 22, 2023 07:45
@jheer jheer merged commit 58bb312 into uwdata:main Sep 22, 2023
2 checks passed
@jheer
Copy link
Member

jheer commented Sep 22, 2023

Thanks @spren9er!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants