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

[Feature Anywhere] Support clicking & custom tooltip functionality from vega charts #3317

Closed
Tracked by #3415
ohltyler opened this issue Jan 25, 2023 · 3 comments
Closed
Tracked by #3415
Assignees
Labels

Comments

@ohltyler
Copy link
Member

ohltyler commented Jan 25, 2023

Coming from #2880

As part of the project design, we need to add custom functionality in the vega line charts such that:

  • clicking on an annotation datapoint opens a 'View events' flyout
  • rendering custom tooltips based on the type of datatpoint (regular or annotation) that is being hovered on

Custom clicking:
This is needed to open the View Events flyout when an annotation datapoint is clicked on. This can be done by adding an event listener in the Vega View to process click events within the chart canvas. Adding filtering on "event"/"annotation" datapoints (datapoints coming from VisLayers) will need to be done, including logic for determining what is/isn't this type. Additionally, will need to be able to toggle clicking on/off, such that it is turned off in the view events flyout. Otherwise this would allow infinite opening of the flyout.

Custom tooltips:
Current mocks have custom data shown when hovering over a particular datapoint, including listing an aggregate view of the events that exist within the particular time bucket. Refer to the mocks in the meta issue for details: #2880. Note that custom tooltips will also require filtering on "event"/"annotation" datapoints.

Based on the current Vega View architecture in Dashboards, there is a single vega base view, which is where the tooltip handler and click handlers can be defined. These maybe can move into a new vega view that overrides functionality to include the custom functionality we want.

For an example on the entry points for enabling the custom functionality - see draft PR #3369

@ohltyler ohltyler added visualizations Issues and PRs related to visualizations feature-anywhere labels Jan 25, 2023
@ohltyler ohltyler changed the title [Feature Anywhere] Support clicking custom tooltip functionality from vega charts [Feature Anywhere] Support clicking & custom tooltip functionality from vega charts Jan 25, 2023
@ohltyler ohltyler self-assigned this Jan 25, 2023
@joshuarrrr
Copy link
Member

@ohltyler is this completed via #3777, or does the tooltip/hover interactions still needed to be added.

@ohltyler
Copy link
Member Author

Tooltip still needs to be addressed, so leaving open for now.

@ohltyler
Copy link
Member Author

Closed via #4120

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

No branches or pull requests

2 participants