MCPcopy
hub / github.com/microsoft/SandDance / tickInterval

Function tickInterval

docs/app/js/sanddance-app.js:112175–112182  ·  view source on GitHub ↗
(start, stop, count)

Source from the content-addressed store, hash-verified

112173 return reverse ? ticks.reverse() : ticks;
112174 }
112175 function tickInterval(start, stop, count) {
112176 const target = Math.abs(stop - start) / count;
112177 const i = (0, _d3Array.bisector)(([, , step])=>step).right(tickIntervals, target);
112178 if (i === tickIntervals.length) return year.every((0, _d3Array.tickStep)(start / (0, _durationJs.durationYear), stop / (0, _durationJs.durationYear), count));
112179 if (i === 0) return (0, _millisecondJsDefault.default).every(Math.max((0, _d3Array.tickStep)(start, stop, count), 1));
112180 const [t, step1] = tickIntervals[target / tickIntervals[i - 1][2] < tickIntervals[i][2] / target ? i - 1 : i];
112181 return t.every(step1);
112182 }
112183 return [
112184 ticks1,
112185 tickInterval

Callers 2

ticks1Function · 0.70
calendarFunction · 0.70

Calls 1

maxMethod · 0.45

Tested by

no test coverage detected