score:0

Accepted answer

in case someone else is having this type of issue, this is what i did to resolve it, apparently, the left value is correct, and there was no need for me to modify it.

        _onmousemove = (e) => {
           if (document.queryselector('.hoverinfo')){
             let maptooltip = document.queryselector('.datamaps-hoverover');
             let maphoversvg = document.queryselector('svg');
             let point = maphoversvg.createsvgpoint();
             point.x = e.clientx;
             point.y = e.clienty;
             let cursor = point.matrixtransform(maphoversvg.getscreenctm().inverse());
             maptooltip.style.top = (cursor.y + 16) + "px";
             console.log(cursor.y); 
        }
      }

Related Query

More Query from same tag