-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[ML] Replace swim lane implementation with elastic-charts Heatmap #79315
Conversation
Some quick feedback after testing c65888d:
|
Great progress! Some suggestions: I wonder if we need the dates on the x-axis for the overall swim lane and the legend for the view-by swim lane, they are quite redundant. Does the component allow to hide them via options? Something like this: I get the intention of the unmasked selected view-by labels and think it's a good idea, it's just that the resulting cut-out shape of the gray area looks a bit odd. Maybe it's worth revisting the existing style and you can simulate the existing behavior by applying not a gray but a white mask with some transparency? What's happening with the gray mask is that the overall darker shape actually draw's the users attention to the mask because it's more prominent and not to the actual selection unfortunately. |
Pinging @elastic/ml-ui (:ml) |
@peteharverson @walterra thanks for checking the PR on the early stage! I addressed all your comments |
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.
The SASS changes LGTM. If I could give a couple quick suggestions. There's a lot of white space to the left of the chart making it seem like the chart is right-aligned. Could be nice to pull it more left. Also, I was confused by the legend. Because of it's placement, I thought it was indicating columns like a top X-axis. Maybe instead of equally spacing it out, you just right aligned them all to without a lot of spacing between. And then you can remove the second one since they are the same.
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.
Checked the @elastic/charts dependency update, LGTM
<EuiButtonEmpty size="xs" onClick={setSelectedCells.bind(null, undefined)}> | ||
<FormattedMessage | ||
id="xpack.ml.explorer.clearSelectionLabel" | ||
defaultMessage="Clear selection" |
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.
I think we also need a way to clear the selection when the swim lane is used as an embeddable.
@cchaos thanks for the review!
|
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.
Got it, thanks. 👍
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.
Tested latest edits and LGTM. The legend labelling, fixing the ability to clear selection in the embeddable, and fixing the selection mask when the number of lanes changed can be done in follow-ups if easier.
@@ -168,17 +175,17 @@ export function getSeverityWithLow(normalizedScore: number): SeverityType { | |||
// for the supplied normalized anomaly score (a value between 0 and 100). | |||
export function getSeverityColor(normalizedScore: number): string { | |||
if (normalizedScore >= ANOMALY_THRESHOLD.CRITICAL) { |
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.
The >
in the legend should actually be >=
to match these conditions? Could the condition in the legend labelling be changed in a follow-up?
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.
thanks for spotting this! yes, I'll adjust the legend labels in a follow-up PR.
💚 Build SucceededMetrics [docs]@kbn/optimizer bundle module count
@kbn/ui-shared-deps asset size
async chunks size
distributable file count
page load bundle size
History
To update your PR or re-run it, just comment with: |
…astic#79315) * [ML] replace swim lane vis * [ML] update swimlane_container, add colors constant * [ML] update swimlane_container, add colors constant * [ML] update swimlane_container, add colors constant * [ML] unfiltered label for Overall swim lane * [ML] tooltip content * [ML] fix styles, override legend styles * [ML] hide timeline for overall swimlane on the Anomaly Explorer page * [ML] remove explorer_swimlane component * [ML] remove dragselect dependency * [ML] fix types * [ML] fix tooltips, change mask fill to white * [ML] fix highlightedData * [ML] maxLegendHeight, fix Y-axis tooltip * [ML] clear selection * [ML] dataTestSubj * [ML] remove jest snapshot for explorer_swimlane * [ML] handle empty string label, fix translation key * [ML] better positioning for the loading indicator * [ML] update elastic/charts version * [ML] fix getFormattedSeverityScore and showSwimlane condition * [ML] fix selector for functional test * [ML] change the legend alignment * [ML] update elastic charts
…9315) (#79744) * [ML] replace swim lane vis * [ML] update swimlane_container, add colors constant * [ML] update swimlane_container, add colors constant * [ML] update swimlane_container, add colors constant * [ML] unfiltered label for Overall swim lane * [ML] tooltip content * [ML] fix styles, override legend styles * [ML] hide timeline for overall swimlane on the Anomaly Explorer page * [ML] remove explorer_swimlane component * [ML] remove dragselect dependency * [ML] fix types * [ML] fix tooltips, change mask fill to white * [ML] fix highlightedData * [ML] maxLegendHeight, fix Y-axis tooltip * [ML] clear selection * [ML] dataTestSubj * [ML] remove jest snapshot for explorer_swimlane * [ML] handle empty string label, fix translation key * [ML] better positioning for the loading indicator * [ML] update elastic/charts version * [ML] fix getFormattedSeverityScore and showSwimlane condition * [ML] fix selector for functional test * [ML] change the legend alignment * [ML] update elastic charts
Summary
Anomaly swim lane rendered by heatmap/swimlane from elastic-charts
Checklist