Search
Preparing search index...
The search index is not available
swimOS
Options
All
Public
Public/Protected
All
Inherited
Externals
Menu
Globals
@swim/scale
TimeScale
Class TimeScale<R, RU>
Type parameters
R
:
RU
RU
Hierarchy
ContinuousScale
<
DateTime
,
R
,
AnyDateTime
,
RU
>
TimeScale
Implements
Equals
Index
Constructors
constructor
Properties
dt
ft
t0
zone
Methods
clamp
Domain
clamp
Scale
domain
equals
interpolator
norm
range
scale
solve
Domain
unscale
form
from
linear
time
Constructors
constructor
new
Time
Scale
(
d0
:
AnyDateTime
, d1
:
AnyDateTime
, ft
:
Interpolator
<
R
,
RU
>
, zone
?:
TimeZone
)
:
TimeScale
Parameters
d0:
AnyDateTime
d1:
AnyDateTime
ft:
Interpolator
<
R
,
RU
>
Optional
zone:
TimeZone
Returns
TimeScale
Properties
dt
dt
:
number
ft
ft
:
Interpolator
<
R
,
RU
>
t0
t0
:
number
zone
zone
:
TimeZone
Methods
clamp
Domain
clamp
Domain
(
tMin
?:
AnyDateTime
, tMax
?:
AnyDateTime
, zMin
?:
undefined
|
number
, zMax
?:
undefined
|
number
, epsilon
?:
undefined
|
number
)
:
TimeScale
<
R
,
RU
>
Parameters
Optional
tMin:
AnyDateTime
Optional
tMax:
AnyDateTime
Optional
zMin:
undefined
|
number
Optional
zMax:
undefined
|
number
Optional
epsilon:
undefined
|
number
Returns
TimeScale
<
R
,
RU
>
clamp
Scale
clamp
Scale
(
d
:
AnyDateTime
)
:
R
Parameters
d:
AnyDateTime
Returns
R
domain
domain
(
)
:
DateTime
[]
domain
(
ts
:
ReadonlyArray
<
AnyDateTime
>
)
:
TimeScale
<
R
,
RU
>
domain
(
t0
:
AnyDateTime
, t1
?:
AnyDateTime
)
:
TimeScale
<
R
,
RU
>
Returns
DateTime
[]
Parameters
ts:
ReadonlyArray
<
AnyDateTime
>
Returns
TimeScale
<
R
,
RU
>
Parameters
t0:
AnyDateTime
Optional
t1:
AnyDateTime
Returns
TimeScale
<
R
,
RU
>
equals
equals
(
that
:
unknown
)
:
boolean
Parameters
that:
unknown
Returns
boolean
interpolator
interpolator
(
)
:
Interpolator
<
R
,
RU
>
interpolator
(
ft
:
AnyInterpolator
<
R
,
RU
>
)
:
TimeScale
<
R
,
RU
>
Returns
Interpolator
<
R
,
RU
>
Parameters
ft:
AnyInterpolator
<
R
,
RU
>
Returns
TimeScale
<
R
,
RU
>
norm
norm
(
d
:
AnyDateTime
)
:
number
Parameters
d:
AnyDateTime
Returns
number
range
range
(
)
:
R
[]
range
(
ys
:
ReadonlyArray
<
RU
>
)
:
TimeScale
<
R
,
RU
>
range
(
y0
:
RU
, y1
?:
RU
)
:
TimeScale
<
R
,
RU
>
Returns
R
[]
Parameters
ys:
ReadonlyArray
<
RU
>
Returns
TimeScale
<
R
,
RU
>
Parameters
y0:
RU
Optional
y1:
RU
Returns
TimeScale
<
R
,
RU
>
scale
scale
(
d
:
AnyDateTime
)
:
R
Parameters
d:
AnyDateTime
Returns
R
solve
Domain
solve
Domain
(
t1
:
AnyDateTime
, y1
:
RU
, t2
?:
AnyDateTime
, y2
?:
RU
, epsilon
?:
undefined
|
number
)
:
TimeScale
<
R
,
RU
>
Parameters
t1:
AnyDateTime
y1:
RU
Optional
t2:
AnyDateTime
Optional
y2:
RU
Optional
epsilon:
undefined
|
number
Returns
TimeScale
<
R
,
RU
>
unscale
unscale
(
y
:
RU
)
:
DateTime
Parameters
y:
RU
Returns
DateTime
Static
form
form<D, R, DU, RU>
(
domainForm
?:
Form
<
D
,
DU
>
, interpolatorForm
?:
Form
<
Interpolator
<
R
,
RU
>
,
AnyInterpolator
<
R
,
RU
>
>
, unit
?:
Scale
<
D
,
R
,
DU
,
RU
>
)
:
Form
<
Scale
<
D
,
R
,
DU
,
RU
>
>
Type parameters
D
:
AnyDateTime
R
:
RU
DU
RU
Parameters
Optional
domainForm:
Form
<
D
,
DU
>
Optional
interpolatorForm:
Form
<
Interpolator
<
R
,
RU
>
,
AnyInterpolator
<
R
,
RU
>
>
Optional
unit:
Scale
<
D
,
R
,
DU
,
RU
>
Returns
Form
<
Scale
<
D
,
R
,
DU
,
RU
>
>
Static
from
from<D, R, DU, RU>
(
x0
:
DU
, x1
:
DU
, fx
:
AnyInterpolator
<
R
,
RU
>
)
:
ContinuousScale
<
D
,
R
,
DU
,
RU
>
from<D, R, DU, RU>
(
x0
:
DU
, x1
:
DU
, y0
:
RU
, y1
:
RU
)
:
ContinuousScale
<
D
,
R
,
DU
,
RU
>
from<D, R, DU, RU>
(
type
:
ScaleType
, fx
:
AnyInterpolator
<
R
,
RU
>
)
:
ContinuousScale
<
D
,
R
,
DU
,
RU
>
from<D, R, DU, RU>
(
type
:
ScaleType
, y0
:
RU
, y1
:
RU
)
:
ContinuousScale
<
D
,
R
,
DU
,
RU
>
Type parameters
D
:
AnyDateTime
R
:
RU
DU
RU
Parameters
x0:
DU
x1:
DU
fx:
AnyInterpolator
<
R
,
RU
>
Returns
ContinuousScale
<
D
,
R
,
DU
,
RU
>
Type parameters
D
:
AnyDateTime
R
:
RU
DU
RU
Parameters
x0:
DU
x1:
DU
y0:
RU
y1:
RU
Returns
ContinuousScale
<
D
,
R
,
DU
,
RU
>
Type parameters
D
:
AnyDateTime
R
:
RU
DU
RU
Parameters
type:
ScaleType
fx:
AnyInterpolator
<
R
,
RU
>
Returns
ContinuousScale
<
D
,
R
,
DU
,
RU
>
Type parameters
D
:
AnyDateTime
R
:
RU
DU
RU
Parameters
type:
ScaleType
y0:
RU
y1:
RU
Returns
ContinuousScale
<
D
,
R
,
DU
,
RU
>
Static
linear
linear<R, RU>
(
xs
:
ReadonlyArray
<
number
>
, fx
:
AnyInterpolator
<
R
,
RU
>
)
:
LinearScale
<
R
,
RU
>
linear<R, RU>
(
xs
:
ReadonlyArray
<
number
>
, ys
:
ReadonlyArray
<
RU
>
)
:
LinearScale
<
R
,
RU
>
linear<R, RU>
(
x0
:
number
, x1
:
number
, fx
:
AnyInterpolator
<
R
,
RU
>
)
:
LinearScale
<
R
,
RU
>
linear<R, RU>
(
x0
:
number
, x1
:
number
, y0
:
RU
, y1
:
RU
)
:
LinearScale
<
R
,
RU
>
Type parameters
R
:
RU
RU
Parameters
xs:
ReadonlyArray
<
number
>
fx:
AnyInterpolator
<
R
,
RU
>
Returns
LinearScale
<
R
,
RU
>
Type parameters
R
:
RU
RU
Parameters
xs:
ReadonlyArray
<
number
>
ys:
ReadonlyArray
<
RU
>
Returns
LinearScale
<
R
,
RU
>
Type parameters
R
:
RU
RU
Parameters
x0:
number
x1:
number
fx:
AnyInterpolator
<
R
,
RU
>
Returns
LinearScale
<
R
,
RU
>
Type parameters
R
:
RU
RU
Parameters
x0:
number
x1:
number
y0:
RU
y1:
RU
Returns
LinearScale
<
R
,
RU
>
Static
time
time<R, RU>
(
ts
:
ReadonlyArray
<
AnyDateTime
>
, ft
:
AnyInterpolator
<
R
,
RU
>
)
:
TimeScale
<
R
,
RU
>
time<R, RU>
(
ts
:
ReadonlyArray
<
AnyDateTime
>
, ys
:
ReadonlyArray
<
RU
>
)
:
TimeScale
<
R
,
RU
>
time<R, RU>
(
t0
:
AnyDateTime
, t1
:
AnyDateTime
, ft
:
AnyInterpolator
<
R
,
RU
>
)
:
TimeScale
<
R
,
RU
>
time<R, RU>
(
t0
:
AnyDateTime
, t1
:
AnyDateTime
, y0
:
RU
, y1
:
RU
)
:
TimeScale
<
R
,
RU
>
Type parameters
R
:
RU
RU
Parameters
ts:
ReadonlyArray
<
AnyDateTime
>
ft:
AnyInterpolator
<
R
,
RU
>
Returns
TimeScale
<
R
,
RU
>
Type parameters
R
:
RU
RU
Parameters
ts:
ReadonlyArray
<
AnyDateTime
>
ys:
ReadonlyArray
<
RU
>
Returns
TimeScale
<
R
,
RU
>
Type parameters
R
:
RU
RU
Parameters
t0:
AnyDateTime
t1:
AnyDateTime
ft:
AnyInterpolator
<
R
,
RU
>
Returns
TimeScale
<
R
,
RU
>
Type parameters
R
:
RU
RU
Parameters
t0:
AnyDateTime
t1:
AnyDateTime
y0:
RU
y1:
RU
Returns
TimeScale
<
R
,
RU
>
Globals
@swim/core
@swim/mesh
@swim/ui
@swim/angle
@swim/animate
@swim/color
@swim/constraint
@swim/dom
@swim/font
@swim/gesture
@swim/interpolate
@swim/length
@swim/render
@swim/scale
@swim/shape
@swim/style
@swim/transform
@swim/transition
@swim/typeset
@swim/view
@swim/ux
@swim/web
Continuous
Scale
Linear
Scale
Linear
Scale
Interpolator
Scale
Scale
Interpolator
Time
Scale
constructor
dt
ft
t0
zone
clamp
Domain
clamp
Scale
domain
equals
interpolator
norm
range
scale
solve
Domain
unscale
form
from
linear
time
Time
Scale
Interpolator
Scale
Type