meteoJS/timeline/visualisation
Source: timeline/
Child class
Abstract types
Class
Visualisation
Method
makeTimeTextCallbackFunction(moment) → module:meteoJS/timeline/visualisation~timeTextCallbackFunction
Format a Date-object via the Moment.js library.
import { makeTimeTextCallbackFunction } from 'meteojs/timeline/Visualisation';
Parameter
| Name | Type | Optional | Description |
|---|---|---|---|
|
moment |
|
Moment.js object. |
- Returns
-
module:meteoJS/timeline/visualisation~timeTextCallbackFunctionCallback.
Abstract types
options Object
Options for Visualisation.
Parameters
| Name | Type | Optional | Description |
|---|---|---|---|
|
timeline |
Yes |
Timeline object. |
|
|
node |
Yes |
Node. |
|
|
animation |
Yes |
Animation object. If specified, the animation will be stopped on user interaction with the visualisation object. |
|
|
enabledStepsOnly |
boolean |
Yes |
Use only enabled times. Defaults to |
|
allEnabledStepsOnly |
boolean |
Yes |
Use only times that are enabled by all sets of time. Defaults to |
|
textInvalid |
string |
Yes |
Output string, if time of timeline is invalid. Defaults to |
|
getTimeText |
module:meteoJS/timeline/visualisation~timeTextCallbackFunction |
Yes |
Returns a textual representation of a time according to a passed format. |
|
outputTimezone |
string |
Yes |
'local' for browser local timezone. |
timeTextCallbackFunction(time, format) → string
Returns a textual representation of a time according to a passed format.
This function could be used to convert Date-objects to a readable time with
external libraries. One such implementation is given by
module:meteoJS/timeline/visualisation.makeTimeTextCallbackFunction.
Parameters
| Name | Type | Optional | Description |
|---|---|---|---|
|
time |
Date |
|
A valid datetime. |
|
format |
string |
|
Format string. |
- Returns
-
stringTextual representation.