Support formatted tooltip for event marks #4123
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Adds a custom
tooltip
field in the event marks in the vega lite spec to only show the relevantVisLayer
fields we are interested in. See screenshot below, where there are 2 differentVisLayer
fields we are interested in - 'Anomalies' and 'Alerts'. Tooltip fns handle the automatic mapping/formatting, we just provide the fields.This PR also updates the
VisLayer
interface to persist a newpluginEventType
field toPointInTimeEventsVisLayer
. This is so we can use this to derive the datatable columns, such that data on the charts will be aggregated into unique values for different plugin event types ; in other words, all events of type 'Anomalies' (could be from multiple detectors) should be grouped into this same event type. This is the expected behavior on UX side as well.Screenshot
Check List
yarn test:jest
yarn test:jest_integration
yarn test:ftr