[ML] Add annotation markers to the Anomaly Swimlane axis#97202
[ML] Add annotation markers to the Anomaly Swimlane axis#97202qn895 merged 17 commits intoelastic:masterfrom
Conversation
|
Noticed that with just a few annotations and without further labeling it might not be that obvious for users what they are looking at: Here's a quick&dirty suggestion how to improve:
|
| tap(explorerService.setChartsDataLoading), | ||
| mergeMap( | ||
| ({ | ||
| allAnnotations, |
There was a problem hiding this comment.
Wondering if we should rename everything related to allAnnotations to overallAnnotations. "all" might be a bit misleading since ANNOTATIONS_TABLE_DEFAULT_QUERY_SIZE = 500 limits how many annotations we fetch and it's not really "all".
|
Agree with @walterra that the annotations would benefit from a label, and I like his proposed styling with border (or single line). I guess that the legend is part of the swim lane chart, so it may be more practical to stick with your current layout where the annotations are below the Overall swim lane. The Overall timeline is probably more important information that the annotations, so again it makes sense to make that the top element in the view. |
|
@walterra @peteharverson I have updated the styling to include the border and label on the y axis here. The result is definitely much more pleasing! |
|
Pinging @elastic/ml-ui (:ml) |
peteharverson
left a comment
There was a problem hiding this comment.
Tested and overall looks good. Just found a few styling / range issues.
| chartElement.selectAll('*').remove(); | ||
|
|
||
| const startingXPos = Y_AXIS_LABEL_WIDTH + 2 * Y_AXIS_LABEL_PADDING; | ||
| const endingXPos = startingXPos + chartWidth - Y_AXIS_LABEL_PADDING; |
There was a problem hiding this comment.
After discussing with Dima, we think the best way to fix this issue is through some modifications with the elastic-charts component itself. We can provide a callback function that exposes the positions of the heatmap cells whenever the swimlane is resized. Added this to the meta issue for Annotations.
peteharverson
left a comment
There was a problem hiding this comment.
Tested latest edits and LGTM. Would be good to align the ends of the annotation bar and the swim lanes, but it is only off by a few pixels so can be addressed separately.
💚 Build SucceededMetrics [docs]Module Count
Async chunks
History
To update your PR or re-run it, just comment with: cc @qn895 |
💚 Backport successful
This backport PR will be merged automatically after passing CI. |




Summary
This PR addresses #93463 and adds annotation markers to the Anomaly swimlane within the Anomaly Explorer page.
Checklist
Delete any items that are not applicable to this PR.