Skip to main content

Class: G3000ChartsUtils

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Charts/G3000ChartsUtils.ts:8

A utility class for working with G3000 electronic charts.

Constructors

Constructor

new G3000ChartsUtils(): G3000ChartsUtils

Returns

G3000ChartsUtils

Methods

getPageDataFromMetadata()

static getPageDataFromMetadata(chartService, metadataArray): Promise<G3000ChartsPageData[]>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Charts/G3000ChartsUtils.ts:32

Gets an array of G3000 chart page data from an array of chart metadata. The page data is ordered according to the order of their associated metadata in the metadata array. If a chart has multiple pages, then the data for each page is placed consecutively in the returned array in ascending page order (page 1, page 2, ..., page n). Page data for charts that could not be retrieved are omitted from the returned array.

Parameters

ParameterTypeDescription
chartServiceChartServiceThe chart service from which to get page data.
metadataArrayreadonly ChartMetadata<string>[]The chart metadata array for which to get page data.

Returns

Promise<G3000ChartsPageData[]>

A Promise which will be fulfilled with the G3000 chart page data corresponding to the specified chart metadata.


pageSelectionEquals()

static pageSelectionEquals(a, b): boolean

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Charts/G3000ChartsUtils.ts:16

Checks whether two page selections are equal. Page selections are equal if and only if they have the same source, the same chart metadata (by GUID), and the same page index.

Parameters

ParameterTypeDescription
aG3000ChartsPageSelectionDataThe first page selection.
bG3000ChartsPageSelectionDataThe second page selection.

Returns

boolean

Whether the two page selections are equal.