Hey Daisy, you can check out what I'm doing for my tooltips.
It's essentially a two step process. I calculate the x and y within the SVG, then I calculate the X and Y of the SVG from the browser top left.
For the SVG I do: this.parentNode.offsetLeft and this.parentNode.offsetTop .. where this is the SVG element. I haven't confirmed, but I believe this may require the SVG to be wrapped in a DIV. (so the top and left would be the same as the svg).
Inside the SVG, I usually use the data point's X and Y (calculated with the scale). But if you don't have that option, I believe you can do element.getBBox().left and .top... though I'm not 100% sure on that, I know it works with text nodes a the very least. But I'm guessing you're positioning the rect mathematically, so you should be able to use that for the X and Y.
Hope that helps, I'll give an example later if you don't get it working,.. just a little busy right now.
Bob