Class

Method

static

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

external:momentjs

 

Moment.js object.

Returns

module:meteoJS/timeline/visualisation~timeTextCallbackFunction Callback.

Abstract types

inner

options  Object

Options for Visualisation.

Parameters

Name Type Optional Description

timeline

module:meteoJS/timeline.Timeline

Yes

Timeline object.

node

external:jQuery

Yes

Node.

animation

module:meteoJS/timeline/animation.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 true.

allEnabledStepsOnly

boolean

Yes

Use only times that are enabled by all sets of time.

Defaults to false.

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.

inner

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

string Textual representation.