novus / nvd3

A reusable charting library written in d3.js
http://nvd3.org/
Other
7.22k stars 2.15k forks source link

Tooltip positioning off when chart inside md-sidenav #1797

Open cmeyertons opened 8 years ago

cmeyertons commented 8 years ago

This is happening because md-sidenav has a transform CSS property on it. Whenever a transform is applied to an element, it creates a new grid coordinate system, which all child elements will think is the outer edge of the viewport.

Because the tooltip positioning is assumes its translate based on pixels away from viewport, the tooltip will be mis-positioned (sometimes even off the screen).

During initTooltip, the tooltip should always be added to the document.body instead of the chartContainer if provided. The d3 selectAll should just look for the tooltip ID instead of all .nv-tooltip.

liquidpele commented 8 years ago

This should already be fixed in master. Can you verify?