Interface: BreakMap
Experimental
The compressed linear space of an axis with range breaks (see the module docs). Raw values are ms since the epoch (UTC) on date axes and plain numbers on linear axes.
Properties
Methods
breaksIn()
breaksIn(lo, hi): object[];Experimental
Merged, sorted breaks overlapping [lo, hi] in raw space, clipped to it (Plotly locateBreaks). Allocates; O(weeks in the interval) with pattern breaks, which are only enumerated between finite bounds.
Parameters
| Parameter | Type |
|---|---|
lo | number |
hi | number |
Returns
object[]
inBreak()
inBreak(raw): boolean;Experimental
Is raw inside a break (min ≤ raw < max)?
Parameters
| Parameter | Type |
|---|---|
raw | number |
Returns
boolean
moveOutside()
moveOutside(raw): number;Experimental
Plotly's moveOutsideBreak: raw itself when it is not in a break, else the end of the (merged) break containing it. Exact.
Parameters
| Parameter | Type |
|---|---|
raw | number |
Returns
number
toLinear()
toLinear(raw): number;Experimental
raw → linear (compressed); a raw value inside a break gives the break's linear point. Monotone non-decreasing; toLinear(0) === 0 (the anchor); exact for integer |raw| up to ±1e14. Non-finite values pass through.
Parameters
| Parameter | Type |
|---|---|
raw | number |
Returns
number
toRaw()
toRaw(l, atStart?): number;Experimental
linear → raw, outside breaks: a break's linear point maps to the break END (where Plotly moves ticks), or with atStart to the break START (the last raw value before it: what the upper end of a range shows). toLinear(toRaw(l)) === l (to float precision). Non-finite values pass through.
Parameters
| Parameter | Type |
|---|---|
l | number |
atStart? | boolean |
Returns
number