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

Enable zooming in HC entity charts #78

Merged
merged 1 commit into from
Aug 31, 2021

Conversation

ohltyler
Copy link
Member

@ohltyler ohltyler commented Aug 30, 2021

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 detectors
  • FeatureBreakDown: Setting the date range based on the passed-in date range (which is zoomRange) 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 the zoomRange when a heatmap cell is selected or de-selected, to refresh any stored data in the components. This is needed since FeatureBreakDown now relies on the zoomRange 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 the zoomRange 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

  • Commits are signed per the DCO using --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.

Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
@ohltyler ohltyler added the v1.1.0 Version 1.1.0 label Aug 30, 2021
@ohltyler ohltyler requested review from kaituo and ylwu-amzn August 30, 2021 18:37
@ohltyler ohltyler linked an issue Aug 30, 2021 that may be closed by this pull request
}
}
}
onBrushEnd={(brushArea: XYBrushArea) => {
Copy link
Contributor

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?

Copy link
Member Author

@ohltyler ohltyler Aug 30, 2021

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.

@ohltyler ohltyler merged commit 2061d88 into opensearch-project:main Aug 31, 2021
@ohltyler ohltyler deleted the hc-zoom branch August 31, 2021 21:20
ohltyler added a commit to ohltyler/anomaly-detection-dashboards-plugin-1 that referenced this pull request Sep 1, 2021
Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
ohltyler added a commit that referenced this pull request Sep 1, 2021
Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
@ohltyler ohltyler added the enhancement New feature or request label Sep 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request v1.1.0 Version 1.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support zooming on selected heatmap cell anomaly charts
3 participants