In principle, the easiest way to achieve this is to set the identifier in the root element and select it (for example, using document.getElementById()), and then call .focus()on it.
When you use a library such as NVD3, it does not give you such flexibility, but for the root element in particular, it is still easy to make it work. A flash consists of a set of elements path, and the first represents the root. So, all you have to do is select the first child pathin the container, get the DOM node and call .focus():
d3.select(".nv-sunburst").select("path").node().focus();
source
share