Skip to main content

Class: G3XChartsUtils

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Charts/G3XChartsUtils.ts:8

A utility class for working with G3X Touch electronic charts.

Constructors​

Constructor​

new G3XChartsUtils(): G3XChartsUtils

Returns​

G3XChartsUtils

Methods​

getPageDataFromMetadata()​

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

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Charts/G3XChartsUtils.ts:32

Gets an array of G3X Touch 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<G3XChartsPageData[]>

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


pageSelectionEquals()​

static pageSelectionEquals(a, b): boolean

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Charts/G3XChartsUtils.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
aG3XChartsPageSelectionDataThe first page selection.
bG3XChartsPageSelectionDataThe second page selection.

Returns​

boolean

Whether the two page selections are equal.