legend (legend) {
        if (!arguments.length) {
            return this._legend;
        }
        this._legend = legend;
        this._legend.parent(this);
        return this;
    }
Attach a Legend widget to this chart. The legend widget will automatically draw legend labels
based on the color setting and names associated with each group.
@example
chart.legend(new Legend().x(400).y(10).itemHeight(13).gap(5))
@param {Legend} [legend]
@returns {Legend|BaseMixin}