width (width) {
        if (!arguments.length) {
            if (!utils.isNumber(this._width)) {
                // only calculate once
                this._width = this._widthCalc(this._root.node());
            }
            return this._width;
        }
        this._widthCalc = width ? (typeof width === 'function' ? width : utils.constant(width)) : this._defaultWidthCalc;
        this._width = undefined;
        return this;
    }
Set or get the width attribute of a chart.
@see {@link BaseMixin#height height}
@see {@link BaseMixin#minWidth minWidth}
@example
// Default width
chart.width(function (element) {
    var width = element && element.getBoundingClientRect && element.getBoundingClientRect().width;
    return (width && width > chart.minWidth()) ? width : chart.minWidth();
});
@param {Number|Function} [width]
@returns {Number|BaseMixin}