@visx/xychart
Version:
Composable cartesian coordinate chart built with visx primitives
10 lines (9 loc) • 326 B
JavaScript
;
exports.__esModule = true;
exports.default = getScaleBandwidth;
function getScaleBandwidth(scale) {
var _s$bandwidth;
// Broaden type before using 'xxx' in s as typeguard.
var s = scale;
return s && 'bandwidth' in s ? (_s$bandwidth = s == null ? void 0 : s.bandwidth()) != null ? _s$bandwidth : 0 : 0;
}