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

highlightBy on ChartPopover #374

Open
marshallpete opened this issue Jul 30, 2024 · 1 comment
Open

highlightBy on ChartPopover #374

marshallpete opened this issue Jul 30, 2024 · 1 comment
Labels
open for contribution Issue is available for contribution

Comments

@marshallpete
Copy link
Member

Provide a general summary of the feature here

Be able to specify which data points get selected for chart popovers.

🤔 Expected Behavior?

Currently you can only select a single point.

It would be nice to be able to select points by the following:

  • item (default)
    • The clicked point is the only one that gets selected
  • dimension
    • All points that have the same dimension as the clicked point get selected
  • series
    • All point that have the same series as the clicked point get selected
  • string[] (group)
    • All points that match the defined group keys get selected

💁 Possible Solution

Need to add select highlighting logic to support the different methods.

This needs to be done for each of the different chart types since most of them handle select highlighting on their own.

🔦 Context

There are requests to be able to select grouped bars by dimension.

💻 Examples

No response

🧢 Your Company/Team

Adobe/AEP

@marshallpete marshallpete added the open for contribution Issue is available for contribution label Aug 29, 2024
@marshallpete marshallpete changed the title selectBy on ChartPopover highlightBy on ChartPopover Aug 29, 2024
@marshallpete
Copy link
Member Author

Implementation

We already do this for hover interactions. The prop is called highlightBy and it is on the ChartTooltip component. This feature request is basically doing the same thing but for ChartPopover and the prop should still be called highlightBy.

It's best to go through the code for highlightBy on ChartTooltip and figure out what it is doing. Then most of this logic can be reused or copied and modified for ChartPopover.

It's also helpful to understand how signals work in vega. Before starting on this issue, I can meet with you to explain a lot of this and get you pointed in the right direction.

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

No branches or pull requests

1 participant