src/chart/sunburst/SunburstPiece.js
function getRootId(node) {
    var ancestor = node;
    while (ancestor.depth > 1) {
        ancestor = ancestor.parentNode;
    }

    var virtualRoot = node.getAncestors()[0];
    return zrUtil.indexOf(virtualRoot.children, ancestor);
}
function getRootId(node) {
    var ancestor = node;
    while (ancestor.depth > 1) {
        ancestor = ancestor.parentNode;
    }

    var virtualRoot = node.getAncestors()[0];
    return zrUtil.indexOf(virtualRoot.children, ancestor);
}
function getRootId ( node ) { var ancestor = node ; while ( ancestor . depth > 1 ) { ancestor = ancestor . parentNode ; } var virtualRoot = node . getAncestors ( ) [ 0 ] ; return zrUtil . indexOf ( virtualRoot . children , ancestor ) ; }
Get index of root in sorted order

@param {TreeNode} node current node
@return {number} index in root
Get index of root in sorted order