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
start
is always less than or equal tostop
, and if the tick step for the givenstart
,stop
andcount
would 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 betweenstart
andstop
(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.