Class JsonDataProvider

A data provider that fetches data from a JSON file.

The JSON file should be an array of objects, where each object represents a single "row" of data.

Example

format of a JSON file:

 [{
"region": "12",
"date": "2022-01-01",
"metric1": 0.1
},
{
"region": "25",
"date": "2022-01-01",
"metric1": 0.5
}]

Hierarchy

Constructors

Properties

dataRowsByRegionId: undefined | Promise<{
    [regionId: string]: DataRow[];
}>
dateField?: string
id: string

A unique provider id to associate with the provider (e.g. "mock"). This ID can be used from a MetricDataReference in a metric to reference the data from this provider.

regionDb: RegionDB
regionField: string
url?: string

Methods

Generated using TypeDoc