- add "moment": "^2.29.1" and "chartjs-adapter-moment": "^1.0.0",

- add core module for time.service.ts
- add interfaces for timespan.ts an dataset.ts
This commit is contained in:
Arno Kaimbacher 2021-09-28 16:26:53 +02:00
parent 5f657dc9e4
commit 4241bd2cb9
15 changed files with 706 additions and 57 deletions

View file

@ -93,4 +93,54 @@ export interface RenderingHints {
properties: {
color: string;
};
}
export interface DataConst extends GeomonTimeseries {
data?: Data<TimeValueTuple>;
}
// export class TimeseriesData {
// public id: string;
// public url: string;
// public data: FirstLastValue[];
// }
export interface IDataEntry { }
export interface Data<T extends IDataEntry> {
values: T[];
referenceValues: ReferenceValues<T>;
valueBeforeTimespan?: T;
valueAfterTimespan?: T;
}
export class ReferenceValues<T extends IDataEntry> {
[key: string]: {
values: T[];
valueBeforeTimespan?: T;
valueAfterTimespan?: T;
};
}
export type TimeValueTuple = [number, number];
export interface GeomonData { }
export class GeomonTimeseriesData implements GeomonData {
referenceValues: ReferenceValues<TimeValueTuple> = {};
valueBeforeTimespan: TimeValueTuple;
valueAfterTimespan: TimeValueTuple;
constructor(
public values: TimeValueTuple[],
) { }
}
export interface HelgolandDataFilter {
expanded?: boolean;
generalize?: boolean;
}