constructor () {
        this._parent = undefined;
        this._x = 0;
        this._y = 0;
        this._itemHeight = 12;
        this._gap = 5;
        this._horizontal = false;
        this._legendWidth = 560;
        this._itemWidth = 70;
        this._autoItemWidth = false;
        this._legendText = pluck('name');
        this._maxItems = undefined;
        this._highlightSelected = false;
        this._keyboardAccessible = false;

        this._g = undefined;
    }
Legend is a attachable widget that can be added to other dc charts to render horizontal legend
labels.

Examples:
- {@link https://dc-js.github.io/dc.js/ Nasdaq 100 Index}
- {@link https://dc-js.github.io/dc.js/crime/index.html Canadian City Crime Stats}
@example
chart.legend(new Legend().x(400).y(10).itemHeight(13).gap(5))
@returns {Legend}