in src/utils/Scale.js [104:124]
export function getTickDomain(scale, { ticks, tickCount, nice } = {}) {
const scaleType = inferScaleType(scale);
const scaleDomain = scale.domain();
if (nice && scaleType !== 'ordinal') {
// If nicing, initialize a new scale and nice it
// eslint-disable-next-line no-param-reassign
scale = scale
.copy()
.domain(scaleDomain)
.nice(tickCount || 10);
}
if (Array.isArray(ticks)) {
return combineDomains([
scale.domain(),
domainFromData(ticks, identity, dataTypeFromScaleType(scaleType)),
]);
} else if (nice && scaleType !== 'ordinal') return scale.domain();
// return undefined by default, if we have no options pertaining to ticks
}