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

Support formatted tooltip for event marks #4123

Merged

Conversation

ohltyler
Copy link
Member

Description

Adds a custom tooltip field in the event marks in the vega lite spec to only show the relevant VisLayer fields we are interested in. See screenshot below, where there are 2 different VisLayer 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 new pluginEventType field to PointInTimeEventsVisLayer. 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

Screenshot 2023-05-23 at 11 14 31 PM

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
    • yarn test:ftr
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

@codecov
Copy link

codecov bot commented May 24, 2023

Codecov Report

Merging #4123 (410e783) into feature/feature-anywhere (e7e4b2a) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@                    Coverage Diff                    @@
##           feature/feature-anywhere    #4123   +/-   ##
=========================================================
  Coverage                     66.50%   66.51%           
=========================================================
  Files                          3246     3246           
  Lines                         62508    62514    +6     
  Branches                       9654     9654           
=========================================================
+ Hits                          41574    41581    +7     
  Misses                        18626    18626           
+ Partials                       2308     2307    -1     
Flag Coverage Δ
Linux 66.45% <100.00%> (+<0.01%) ⬆️
Windows 66.45% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/plugins/vis_augmenter/public/types.ts 100.00% <ø> (ø)
src/plugins/vis_augmenter/public/constants.ts 100.00% <100.00%> (ø)
src/plugins/vis_augmenter/public/test_constants.ts 100.00% <100.00%> (ø)
src/plugins/vis_augmenter/public/vega/helpers.ts 94.44% <100.00%> (+1.11%) ⬆️

Copy link
Member

@joshuarrrr joshuarrrr left a comment

Choose a reason for hiding this comment

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

One question, but the code generally looks fine.

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

Successfully merging this pull request may close these issues.

3 participants