Skip to main content

Interface: ITimezoneApi

Charting Library.ITimezoneApi

Methods

availableTimezones

availableTimezones(): readonly TimezoneInfo[]

Array of supported TimezoneInfo

Returns

readonly TimezoneInfo[]


getTimezone

getTimezone(): TimezoneInfo

Returns the current TimezoneInfo

Returns

TimezoneInfo


onTimezoneChanged

onTimezoneChanged(): ISubscription<(timezone: TimezoneId) => void>

To be notified when the timezone is changed

Example:

timezoneApi.onTimezoneChanged().subscribe(
null,
timezone => console.log(`New timezone: ${timezone}`),
true
);

Returns

ISubscription<(timezone: TimezoneId) => void>


setTimezone

setTimezone(timezone, options?): void

Sets the current timezone

Parameters

NameType
timezoneTimezoneId | CustomTimezoneId
options?UndoOptions

Returns

void