- npm updates
- add legend-entry-component files - add DatasetOptions class
This commit is contained in:
parent
dbf8aa495e
commit
91cd763da0
15 changed files with 1043 additions and 534 deletions
|
@ -1,4 +1,5 @@
|
|||
import { GeomonPlatform } from "./platform";
|
||||
import { InternalIdHandler } from '../../common/components/services/internal-id-handler.service';
|
||||
|
||||
const INTERNAL_ID_SEPERATOR = '_';
|
||||
|
||||
|
@ -37,7 +38,7 @@ export class GeomonDataset {
|
|||
public url: string,
|
||||
public label: string
|
||||
) {
|
||||
// this.internalId = new InternalIdHandler().createInternalId(url, id);
|
||||
this.internalId = new InternalIdHandler().createInternalId(url, id);
|
||||
}
|
||||
// public get internalId(): string {
|
||||
// return this.url + INTERNAL_ID_SEPERATOR + this.id;
|
||||
|
@ -69,6 +70,7 @@ export class ParameterConstellation {
|
|||
public procedure: Parameter;
|
||||
public phenomenon: Parameter;
|
||||
public category: Parameter;
|
||||
public platform: Parameter;
|
||||
}
|
||||
interface Parameter {
|
||||
id: string;
|
||||
|
@ -100,6 +102,23 @@ export interface DataConst extends GeomonTimeseries {
|
|||
}
|
||||
|
||||
|
||||
export interface DatasetFilter {
|
||||
phenomenon?: string;
|
||||
category?: string;
|
||||
procedure?: string;
|
||||
feature?: string;
|
||||
offering?: string;
|
||||
service?: string;
|
||||
expanded?: boolean;
|
||||
locale?: string;
|
||||
type?: DatasetType;
|
||||
}
|
||||
|
||||
export enum DatasetType {
|
||||
Timeseries = 'timeseries',
|
||||
Trajectory = 'trajectory',
|
||||
Profile = 'profile'
|
||||
}
|
||||
|
||||
// export class TimeseriesData {
|
||||
// public id: string;
|
||||
|
|
111
src/shared/models/options.ts
Normal file
111
src/shared/models/options.ts
Normal file
|
@ -0,0 +1,111 @@
|
|||
export class DatasetOptions {
|
||||
|
||||
/**
|
||||
* internal dataset id
|
||||
*/
|
||||
public internalId: string;
|
||||
|
||||
/**
|
||||
* type to display the data
|
||||
* default is 'line'
|
||||
*/
|
||||
public type: 'line' | 'bar' = 'line';
|
||||
|
||||
/**
|
||||
* color of the dataset
|
||||
*/
|
||||
public color: string;
|
||||
|
||||
/**
|
||||
* show or hide in the graph
|
||||
*/
|
||||
public visible: boolean = true;
|
||||
|
||||
/**
|
||||
* separate y axis of datasets with same unit
|
||||
*/
|
||||
public separateYAxis?: boolean = false;
|
||||
|
||||
/**
|
||||
* align graph that zero y axis is visible
|
||||
*/
|
||||
public zeroBasedYAxis?: boolean = false;
|
||||
|
||||
/**
|
||||
* auto zoom when range selection
|
||||
*/
|
||||
public autoRangeSelection?: boolean = false;
|
||||
|
||||
/**
|
||||
* marker to request dataset data generalized
|
||||
*/
|
||||
public generalize?: boolean = false;
|
||||
|
||||
/**
|
||||
* list of visible reference values
|
||||
*/
|
||||
public showReferenceValues: ReferenceValueOption[] = [];
|
||||
|
||||
/**
|
||||
* radius of graphpoint
|
||||
* default is 0
|
||||
*/
|
||||
public pointRadius: number = 0;
|
||||
|
||||
/**
|
||||
* the start of, where to start with the bar chart
|
||||
* See also: https://momentjs.com/docs/#/manipulating/start-of/
|
||||
* default is 'hour'
|
||||
*/
|
||||
public barStartOf: string = 'hour';
|
||||
|
||||
|
||||
/**
|
||||
* width of graphline
|
||||
*/
|
||||
public lineWidth: number = 1;
|
||||
|
||||
/**
|
||||
* dasharray to structure the line or bar chart border
|
||||
* See also here: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dasharray
|
||||
*/
|
||||
public lineDashArray: number | number[];
|
||||
|
||||
/**
|
||||
* color of the point border
|
||||
*/
|
||||
public pointBorderColor: string;
|
||||
|
||||
/**
|
||||
* width of the point border
|
||||
*/
|
||||
public pointBorderWidth: number = 0;
|
||||
|
||||
/**
|
||||
* min and max range of y axis
|
||||
*/
|
||||
public yAxisRange?: MinMaxRange;
|
||||
|
||||
constructor(
|
||||
internalId: string,
|
||||
color: string
|
||||
) {
|
||||
this.internalId = internalId;
|
||||
this.color = color;
|
||||
}
|
||||
}
|
||||
|
||||
export interface ReferenceValueOption {
|
||||
id: string;
|
||||
color: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* numbered range with a min and a max value
|
||||
*
|
||||
* @export
|
||||
*/
|
||||
export interface MinMaxRange {
|
||||
min?: number;
|
||||
max?: number;
|
||||
}
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue