-
Notifications
You must be signed in to change notification settings - Fork 61
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
Enable zooming in HC entity charts #78
Conversation
Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
} | ||
} | ||
} | ||
onBrushEnd={(brushArea: XYBrushArea) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For single-entity detector, the zooming will dynamically sample anomaly results and show. For example, if the date range is big and contains too many data points, we will sample 1000 anomaly results points and show them. For HC detector, is it the same logic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we bucketize the results the same way as the single entity. It is abstracted such that the results are handled without context of single entity vs. multi entity, real-time vs. historical, etc.
The bulk of that logic is done in AnomalyHistory if you're interested.
Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
Signed-off-by: Tyler Ohlsen ohltyler@amazon.com
Description
This PR adds zooming capabilities to the anomaly chart when selecting a heatmap cell for high-cardinality detectors.
Changes include:
AnomaliesDetailChart
: Allowing zooming for high-cardinality detectorsFeatureBreakDown
: Setting the date range based on the passed-in date range (which iszoomRange
) instead of the heatmap cell. This is so we can narrow the range if the user zooms, rather than leaving it at the heatmap cell's static range.AnomalyHistory
: setting thezoomRange
when a heatmap cell is selected or de-selected, to refresh any stored data in the components. This is needed sinceFeatureBreakDown
now relies on thezoomRange
to get the date range.AnomalyResultsTable
: Only populate with anomalies when applicable. The two applicable cases are (1) non high-cardinality detectors and (2) high-cardinality detectors when a heatmap cell is selected. This had to be changed due to thezoomRange
allowing more results to be shown, so more filtering was needed.Testing:
Confirmed the zooming works, and updates the corresponding table and feature breakdown accordingly.
Confirmed that selecting different heatmap cells or de-selecting heatmap cells will clear the zoom range.
Confirmed it works for historical and real-time.
Confirmed it doesn't break the components for non-high-cardinality detectors.
Issues Resolved
#75
Check List
--signoff
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.