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

Fix chart range bug of non-HC anomaly and feature charts #122

Merged
merged 1 commit into from
Nov 8, 2021

Conversation

ohltyler
Copy link
Member

@ohltyler ohltyler commented Nov 8, 2021

Signed-off-by: Tyler Ohlsen ohltyler@amazon.com

Description

Fixes a bug in the non-high-cardinality scenario where anomaly and feature charts were showing the explicit range based on the timestamps of anomaly results found in the parent date range, rather than showing the static date range itself. (see #121 for details/screenshots).

This fixes that bug by 2 main changes:

  1. Explicitly setting the range of x values for the chart via xDomain chart prop for both anomaly details and feature charts
  2. Splitting up the logic for HC and non-HC results, when the zoom range is changed. For example, in the non-HC scenario, if the zoom range is changed, we want to update the parent date range (as shown in the date range picker). In the HC scenario, we only want to change the range shown on the child charts, and not on the parent date range (if we change the parent date range here, then any selected heatmap cell would be de-selected, and the entire heatmap would be re-generated based on the new date range, which we don't want).

Confirmed everything works as expected for non-HC, single-HC, and multi-HC, for both RT and historical results.

Issues Resolved

Closes #121

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 bug Something isn't working documentation Improvements or additions to documentation labels Nov 8, 2021
@ohltyler ohltyler added v1.2.0 Version 1.2.0 and removed documentation Improvements or additions to documentation labels Nov 8, 2021
Comment on lines +524 to +525
showAggregateResults
? undefined
Copy link
Member Author

Choose a reason for hiding this comment

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

an error will be thrown if we set an xDomain in the aggregate anomalies case, since the scale type (see lines 633-635) won't work properly in the ScaleType.Ordinal type

@ohltyler ohltyler merged commit 1c6a1ec into opensearch-project:main Nov 8, 2021
@ohltyler ohltyler deleted the range-bug branch November 8, 2021 20:19
ohltyler added a commit to ohltyler/anomaly-detection-dashboards-plugin-1 that referenced this pull request Nov 8, 2021
ohltyler added a commit that referenced this pull request Nov 9, 2021
Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v1.2.0 Version 1.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Anomaly overview chart shows wrong range on time axis
3 participants