I have revised the code but the tooltip or title is still not showing up. Can you check if I made the changes correctly?
var use = document.createElementNS("http://www.w3.org/2000/svg", "use");
use.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href", "mydefs.svg#hello");
var title = document.createElementNS('http://www.w3.org/2000/svg', 'title');
title.textContent = data[i].status;//JSON Object
svg.appendChild(rect);
svg.appendChild(text);
//Added Use and Title
svg.appendChild(use);
svg.appendChild(title);
document.body.appendChild(svg);