Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(tooltip): fix positioning when charts are rendered inside an scal…
…ed div (#2034) * Fix tooltip positioning when charts are rendered inside an scaled div In a normal situation mouse enter / mouse leave events capture the position ok. But when the chart is inside a scaled element with a CSS transform like: `transform: scale(2);` tooltip are not positioned ok. Comparing original width `box.width` agains scaled width give us the scaling factor to calculate ok mouse position. * Fix tooltip positioning on line slice tooltips When a Nivo chart is inside an scaled div with something like `transform: scale(2)` for example tooltips inside slides are not positoned correctly. Taking into accoun `offsetWidth` fix the issue
- Loading branch information