Ticks topic
Generate representative values from a continuous interval.
Functions
-
nice(
num start, num stop, num count) → (num, num) Ticks -
Returns a new interval [niceStart, niceStop] covering the given
interval [
start,stop] and where niceStart and niceStop are guaranteed to align with the corresponding tickStep. -
range(
{num start = 0, required num stop, num step = 1}) → List< Ticksnum> - Returns an list containing an arithmetic progression, similar to the Python built-in range.
-
tickIncrement(
num start, num stop, num count) → num Ticks -
Like tickStep, except requires that
startis always less than or equal tostop, and if the tick step for the givenstart,stopandcountwould be less than one, returns the negative inverse tick step instead. -
ticks(
num start, num stop, num count) → List< Ticksnum> -
Returns an list of approximately
count+ 1 uniformly-spaced, nicely-rounded values betweenstartandstop(inclusive). -
tickStep(
num start, num stop, num count) → num Ticks - Returns the difference between adjacent tick values if the same arguments were passed to ticks: a nicely-rounded value that is a power of ten multiplied by 1, 2 or 5.