Skip to content

Commit

Permalink
fix: remove max-width from tooltip div (#909)
Browse files Browse the repository at this point in the history
* fix: remove max-width from tooltip div

* remove unused parameter

Co-authored-by: Bryan Keller <bkeller@netflix.com>
  • Loading branch information
2 people authored and zhaoyongjie committed Nov 26, 2021
1 parent 114d78e commit 4db360c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1153,7 +1153,7 @@ function nvd3Vis(element, props) {
}
}

wrapTooltip(chart, maxWidth);
wrapTooltip(chart);

return chart;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,14 +307,14 @@ export function removeTooltip(uuid) {
}
}

export function wrapTooltip(chart, maxWidth) {
export function wrapTooltip(chart) {
const tooltipLayer =
chart.useInteractiveGuideline && chart.useInteractiveGuideline()
? chart.interactiveLayer
: chart;
const tooltipGeneratorFunc = tooltipLayer.tooltip.contentGenerator();
tooltipLayer.tooltip.contentGenerator(d => {
let tooltip = `<div style="max-width: ${maxWidth * 0.5}px">`;
let tooltip = `<div>`;
tooltip += tooltipGeneratorFunc(d);
tooltip += '</div>';

Expand Down

0 comments on commit 4db360c

Please sign in to comment.