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

[ML] Adds missing tooltips to Anomaly Explorer swimlane labels #46324

Merged
merged 3 commits into from
Sep 24, 2019
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions x-pack/legacy/plugins/ml/public/explorer/explorer_swimlane.js
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,15 @@ export const ExplorerSwimlane = injectI18n(class ExplorerSwimlane extends React.
.each(function () {
if (swimlaneData.fieldName !== undefined) {
d3.select(this)
.attr('tooltip-html-unsafe', label => `${mlEscape(swimlaneData.fieldName)}: ${mlEscape(label)}`)
.attr('tooltip-placement', 'right')
.on('mouseover', label => {
mlChartTooltipService.show(`${mlEscape(swimlaneData.fieldName)}: ${mlEscape(label)}`, this, {
x: 170,
darnautov marked this conversation as resolved.
Show resolved Hide resolved
y: 20
});
})
.on('mouseout', () => {
mlChartTooltipService.hide();
})
.attr('aria-label', label => `${mlEscape(swimlaneData.fieldName)}: ${mlEscape(label)}`);
}
});
Expand Down