anchor (parent, chartGroup) {
        if (!arguments.length) {
            return this._anchor;
        }
        if (instanceOfChart(parent)) {
            this._anchor = parent.anchor();
            if (this._anchor.children) { // is _anchor a div?
                this._anchor = `#${parent.anchorName()}`;
            }
            this._root = parent.root();
            this._isChild = true;
        } else if (parent) {
            if (parent.select && parent.classed) { // detect d3 selection
                this._anchor = parent.node();
            } else {
                this._anchor = parent;
            }
            this._root = select(this._anchor);
            this._root.classed(constants.CHART_CLASS, true);
            registerChart(this, chartGroup);
            this._isChild = false;
        } else {
            throw new BadArgumentException('parent must be defined');
        }
        this._chartGroup = chartGroup;
        return this;
    }
Set the root SVGElement to either be an existing chart's root; or any valid [d3 single
selector](https://github.com/d3/d3-selection/blob/master/README.md#selecting-elements) specifying a dom
block element such as a div; or a dom element or d3 selection. Optionally registers the chart
within the chartGroup. This class is called internally on chart initialization, but be called
again to relocate the chart. However, it will orphan any previously created SVGElements.
@param {anchorChart|anchorSelector|anchorNode} [parent]
@param {String} [chartGroup]
@returns {String|node|d3.selection|BaseMixin}