Skip to content

[ML] Anomalies table: Enhances display for anomaly time function values#216142

Merged
rbrtj merged 15 commits intoelastic:mainfrom
rbrtj:ml-anomaly-explorer-anomaly-value-formatting
Apr 2, 2025
Merged

[ML] Anomalies table: Enhances display for anomaly time function values#216142
rbrtj merged 15 commits intoelastic:mainfrom
rbrtj:ml-anomaly-explorer-anomaly-value-formatting

Conversation

@rbrtj
Copy link
Contributor

@rbrtj rbrtj commented Mar 27, 2025

Introducing tooltips and +1 / -1 subscripts for date values to improve readability for the values of time_of_day anomaly detection function.

Fix for: #213882
It turns out the formatting was correct for the screenshot provided in the issue as the upper bound is pointing to the next day.

image

Format following these changes:
image

Screenshot 2025-03-27 at 12 01 22

@rbrtj rbrtj added :ml Feature:Anomaly Detection ML anomaly detection backport:skip This PR does not require backporting Team:ML Team label for ML (also use :ml) t// v9.1.0 labels Mar 27, 2025
@rbrtj rbrtj self-assigned this Mar 27, 2025
@rbrtj rbrtj requested a review from a team as a code owner March 27, 2025 11:02
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

@elastic-vault-github-plugin-prod elastic-vault-github-plugin-prod bot requested a review from a team as a code owner March 27, 2025 11:27
@peteharverson peteharverson changed the title [ML] Anomaly Explorer: Display tooltip for anomaly time function values [ML] Anomalies table: Enhances display for anomaly time function values Mar 27, 2025
Copy link
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

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

Really like the addition of the +1 / -1 to clarify the values here. Overall looks good, just left a couple of comments.

}));

const baseProps = {
value: 42.5,
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it worth setting more decimal places in the test value here to check that the formatting truncates the number of decimal places to the expected value? (Although we are doing this in the format_value.ts tests, so maybe not needed here too).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it's not necessary, as format_value.ts is tested properly, and here we just want to ensure that the component correctly uses the formatter and displays its output.

source
description: (
<AnomalyValueDisplay
value={anomaly.source.anomaly_score_explanation?.upper_confidence_bound}
Copy link
Contributor

Choose a reason for hiding this comment

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

@valeriy42 out of interest, why do some anomalies not have the upper / lower bounds set?

Screenshot 2025-03-27 at 12 52 58

@rbrtj rbrtj removed the request for review from a team March 28, 2025 13:32
Copy link
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

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

Tested latest changes and LGTM

Copy link
Contributor

@darnautov darnautov left a comment

Choose a reason for hiding this comment

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

LGTM

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

The CI Stats report is too large to be displayed here, check out the CI build annotation for this information.

History

cc @rbrtj

@rbrtj rbrtj merged commit e510e53 into elastic:main Apr 2, 2025
9 checks passed
@rbrtj rbrtj added backport:version Backport to applied version labels v8.19.0 and removed backport:skip This PR does not require backporting labels Apr 2, 2025
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/14214670756

@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/14214670806

kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Apr 2, 2025
…es (elastic#216142)

Introducing tooltips and `+1` / `-1` subscripts for date values to
improve readability for the values of `time_of_day` anomaly detection
function.

Fix for: elastic#213882
It turns out the formatting was correct for the screenshot provided in
the issue as the upper bound is pointing to the next day.

![image](https://github.com/user-attachments/assets/52ca47d9-ffb2-41dd-b9a6-0442c7fe1a0d)

Format following these changes:

![image](https://github.com/user-attachments/assets/222cc6be-a282-48f8-8391-8d076afb56a8)

![Screenshot 2025-03-27 at 12 01
22](https://github.com/user-attachments/assets/2488df90-717e-4da6-8240-f1002327a007)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit e510e53)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Apr 2, 2025
…es (elastic#216142)

Introducing tooltips and `+1` / `-1` subscripts for date values to
improve readability for the values of `time_of_day` anomaly detection
function.

Fix for: elastic#213882
It turns out the formatting was correct for the screenshot provided in
the issue as the upper bound is pointing to the next day.

![image](https://github.com/user-attachments/assets/52ca47d9-ffb2-41dd-b9a6-0442c7fe1a0d)

Format following these changes:

![image](https://github.com/user-attachments/assets/222cc6be-a282-48f8-8391-8d076afb56a8)

![Screenshot 2025-03-27 at 12 01
22](https://github.com/user-attachments/assets/2488df90-717e-4da6-8240-f1002327a007)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit e510e53)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Apr 2, 2025
…n values (#216142) (#216755)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[ML] Anomalies table: Enhances display for anomaly time function
values (#216142)](#216142)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Robert
Jaszczurek","email":"92210485+rbrtj@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-04-02T07:59:30Z","message":"[ML]
Anomalies table: Enhances display for anomaly time function values
(#216142)\n\nIntroducing tooltips and `+1` / `-1` subscripts for date
values to\nimprove readability for the values of `time_of_day` anomaly
detection\nfunction.\n\nFix for:
https://github.com/elastic/kibana/issues/213882\nIt turns out the
formatting was correct for the screenshot provided in\nthe issue as the
upper bound is pointing to the next
day.\n\n\n![image](https://github.com/user-attachments/assets/52ca47d9-ffb2-41dd-b9a6-0442c7fe1a0d)\n\nFormat
following these
changes:\n\n![image](https://github.com/user-attachments/assets/222cc6be-a282-48f8-8391-8d076afb56a8)\n\n![Screenshot
2025-03-27 at 12
01\n22](https://github.com/user-attachments/assets/2488df90-717e-4da6-8240-f1002327a007)\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"e510e533a4bc7f701467e34131064aaa207133ab","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement",":ml","Feature:Anomaly
Detection","Team:ML","backport:version","v9.1.0","v8.19.0"],"title":"[ML]
Anomalies table: Enhances display for anomaly time function
values","number":216142,"url":"https://github.com/elastic/kibana/pull/216142","mergeCommit":{"message":"[ML]
Anomalies table: Enhances display for anomaly time function values
(#216142)\n\nIntroducing tooltips and `+1` / `-1` subscripts for date
values to\nimprove readability for the values of `time_of_day` anomaly
detection\nfunction.\n\nFix for:
https://github.com/elastic/kibana/issues/213882\nIt turns out the
formatting was correct for the screenshot provided in\nthe issue as the
upper bound is pointing to the next
day.\n\n\n![image](https://github.com/user-attachments/assets/52ca47d9-ffb2-41dd-b9a6-0442c7fe1a0d)\n\nFormat
following these
changes:\n\n![image](https://github.com/user-attachments/assets/222cc6be-a282-48f8-8391-8d076afb56a8)\n\n![Screenshot
2025-03-27 at 12
01\n22](https://github.com/user-attachments/assets/2488df90-717e-4da6-8240-f1002327a007)\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"e510e533a4bc7f701467e34131064aaa207133ab"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/216142","number":216142,"mergeCommit":{"message":"[ML]
Anomalies table: Enhances display for anomaly time function values
(#216142)\n\nIntroducing tooltips and `+1` / `-1` subscripts for date
values to\nimprove readability for the values of `time_of_day` anomaly
detection\nfunction.\n\nFix for:
https://github.com/elastic/kibana/issues/213882\nIt turns out the
formatting was correct for the screenshot provided in\nthe issue as the
upper bound is pointing to the next
day.\n\n\n![image](https://github.com/user-attachments/assets/52ca47d9-ffb2-41dd-b9a6-0442c7fe1a0d)\n\nFormat
following these
changes:\n\n![image](https://github.com/user-attachments/assets/222cc6be-a282-48f8-8391-8d076afb56a8)\n\n![Screenshot
2025-03-27 at 12
01\n22](https://github.com/user-attachments/assets/2488df90-717e-4da6-8240-f1002327a007)\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"e510e533a4bc7f701467e34131064aaa207133ab"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Robert Jaszczurek <92210485+rbrtj@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels Feature:Anomaly Detection ML anomaly detection :ml release_note:enhancement Team:ML Team label for ML (also use :ml) t// v8.19.0 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants