src/coord/Axis.js
function () {
        var axisExtent = this._extent;
        var dataExtent = this.scale.getExtent();

        var len = dataExtent[1] - dataExtent[0] + (this.onBand ? 1 : 0);
        // Fix #2728, avoid NaN when only one data.
        len === 0 && (len = 1);

        var size = Math.abs(axisExtent[1] - axisExtent[0]);

        return Math.abs(size) / len;
    }
function () {
        var axisExtent = this._extent;
        var dataExtent = this.scale.getExtent();

        var len = dataExtent[1] - dataExtent[0] + (this.onBand ? 1 : 0);
        // Fix #2728, avoid NaN when only one data.
        len === 0 && (len = 1);

        var size = Math.abs(axisExtent[1] - axisExtent[0]);

        return Math.abs(size) / len;
    }
function ( ) { var axisExtent = this . _extent ; var dataExtent = this . scale . getExtent ( ) ; var len = dataExtent [ 1 ] - dataExtent [ 0 ] + ( this . onBand ? 1 : 0 ) ; // Fix #2728, avoid NaN when only one data. len === 0 && ( len = 1 ) ; var size = Math . abs ( axisExtent [ 1 ] - axisExtent [ 0 ] ) ; return Math . abs ( size ) / len ; }
Get width of band
@return {number}
Get width of band