Skip to content

Commit

Permalink
fix(chart): alert tooltip DOM replacement logic
Browse files Browse the repository at this point in the history
  • Loading branch information
tay1orjones committed Oct 26, 2020
1 parent 45f703b commit 04a9f06
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/BarChartCard/barChartUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ export const handleTooltip = (
.replaceWith(parsedDateLabel.querySelector('li'));
}

return parsedTooltip.querySelector('ul').outerHTML;
return parsedTooltip.innerHTML;
};

/**
Expand Down
4 changes: 2 additions & 2 deletions src/components/TimeSeriesCard/TimeSeriesCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -242,10 +242,10 @@ export const handleTooltip = (

// Append all the matching alert labels
matchingAlertLabelsDOM.querySelectorAll('li').forEach((label) => {
defaultTooltipDOM.append(label);
defaultTooltipDOM.querySelector('ul').append(label);
});

return defaultTooltipDOM.querySelector('ul').outerHTML;
return defaultTooltipDOM.innerHTML;
};

/**
Expand Down

0 comments on commit 04a9f06

Please sign in to comment.