UNPKG

webglimpse

Version:

Webglimpse is a data visualization library for the web.

476 lines (475 loc) 16.2 kB
import { OrderedStringSet, OrderedSet } from '../util/ordered_set'; import { Color } from '../color'; import { Notification, Notification2 } from '../util/notification'; import { FillPattern } from './timeline_events_row'; import { Axis1D } from '../plot/axis'; import { Insets } from '../layout/inset_layout'; export interface TimelineCursor { cursorGuid: string; labeledTimeseriesGuids: string[]; lineColor: string; textColor: string; showVerticalLine: boolean; showHorizontalLine: boolean; showCursorText: boolean; } export interface TimelineAnnotation { annotationGuid: string; time_ISO8601?: string; y?: number; label: string; styleGuid: string; pickable?: boolean; } export interface TimelineTimeseries { timeseriesGuid: string; uiHint?: string; baseline?: number; lineColor?: string; pointColor?: string; lineThickness?: number; pointSize?: number; dash?: number; fragmentGuids?: string[]; } export interface TimelineTimeseriesFragment { fragmentGuid: string; data?: number[]; times_ISO8601?: string[]; userEditMode?: string; } export interface TimelineEvent { eventGuid: string; start_ISO8601: string; end_ISO8601: string; label: string; startLimit_ISO8601?: string; endLimit_ISO8601?: string; labelIcon?: string; userEditable?: boolean; styleGuid?: string; order?: number; topMargin?: number; bottomMargin?: number; fgColor?: string; bgColor?: string; bgSecondaryColor?: string; borderColor?: string; borderSecondaryColor?: string; labelTopMargin?: number; labelBottomMargin?: number; labelVAlign?: number; labelVPos?: number; labelHAlign?: number; labelHPos?: number; isBorderDashed?: boolean; fillPattern?: string; } export interface TimelineRow { rowGuid: string; label: string; truncate?: boolean; hidden?: boolean; rowHeight?: number; yMin?: number; yMax?: number; uiHint?: string; eventGuids?: string[]; timeseriesGuids?: string[]; annotationGuids?: string[]; cursorGuid?: string; bgColor?: string; fgLabelColor?: string; bgLabelColor?: string; labelFont?: string; cursor?: string; highlighted?: boolean; highlightColor?: Color; highlightWidth?: number; highlightInsets?: Insets; } export interface TimelineGroup { groupGuid: string; rollupGuid?: string; label: string; hidden?: boolean; collapsed?: boolean; highlighted?: boolean; highlightColor?: Color; highlightWidth?: number; highlightInsets?: Insets; dashPattern?: number; dashLength?: number; rowGuids: string[]; labelFont?: string; cursor?: string; } export interface TimelineRoot { groupGuids: string[]; topPinnedRowGuids: string[]; bottomPinnedRowGuids: string[]; maximizedRowGuids: string[]; } export interface Timeline { cursors: TimelineCursor[]; annotations: TimelineAnnotation[]; timeseriesFragments: TimelineTimeseriesFragment[]; timeseries: TimelineTimeseries[]; events: TimelineEvent[]; rows: TimelineRow[]; groups: TimelineGroup[]; root: TimelineRoot; } export declare class TimelineCursorModel { private _cursorGuid; private _labeledTimeseriesGuids; private _lineColor; private _textColor; private _showCursorText; private _showVerticalLine; private _showHorizontalLine; private _attrsChanged; constructor(cursor: TimelineCursor); get labeledTimeseriesGuids(): OrderedStringSet; get cursorGuid(): string; get attrsChanged(): Notification; get lineColor(): Color; get textColor(): Color; get showVerticalLine(): boolean; get showHorizontalLine(): boolean; get showCursorText(): boolean; setAttrs(cursor: TimelineCursor): void; snapshot(): TimelineCursor; } export declare class TimelineAnnotationModel { private _annotationGuid; private _attrsChanged; private _time_PMILLIS; private _y; private _label; private _styleGuid; private _pickable; constructor(annotation: TimelineAnnotation); get annotationGuid(): string; get attrsChanged(): Notification; setLocation(time_PMILLIS: number, y: number): void; get time_PMILLIS(): number; set time_PMILLIS(time_PMILLIS: number); get y(): number; set y(y: number); get label(): string; set label(label: string); get styleGuid(): string; set styleGuid(styleGuid: string); get pickable(): boolean; set pickable(pickable: boolean); setAttrs(annotation: TimelineAnnotation): void; snapshot(): TimelineAnnotation; } export declare class TimelineTimeseriesModel { private _timeseriesGuid; private _attrsChanged; private _uiHint; private _baseline; private _lineColor; private _pointColor; private _lineThickness; private _pointSize; private _dash; private _fragmentGuids; constructor(timeseries: TimelineTimeseries); get timeseriesGuid(): string; get attrsChanged(): Notification; setAttrs(timeseries: TimelineTimeseries): void; get baseline(): number; set baseline(baseline: number); get lineColor(): Color; set lineColor(lineColor: Color); get pointColor(): Color; set pointColor(pointColor: Color); get lineThickness(): number; set lineThickness(lineThickness: number); get pointSize(): number; set pointSize(pointSize: number); get dash(): number; set dash(dash: number); get uiHint(): string; set uiHint(uiHint: string); get fragmentGuids(): OrderedStringSet; set fragmentGuids(fragmentGuids: OrderedStringSet); snapshot(): TimelineTimeseries; } export declare class TimelineTimeseriesFragmentModel { private _fragmentGuid; private _dataChanged; private _attrsChanged; private _userEditMode; private _data; private _times_PMILLIS; constructor(fragment: TimelineTimeseriesFragment); get fragmentGuid(): string; get dataChanged(): Notification2<number, number>; setAttrs(fragment: TimelineTimeseriesFragment): void; get data(): number[]; set data(data: number[]); get times_PMILLIS(): number[]; set times_PMILLIS(times_PMILLIS: number[]); setAllData(data: number[], times_PMILLIS: number[]): void; setData(index: number, value: number, time?: number): number; get start_PMILLIS(): number; get end_PMILLIS(): number; get userEditMode(): string; set userEditMode(userEditMode: string); snapshot(): TimelineTimeseriesFragment; } export declare class TimelineEventModel { private _eventGuid; private _attrsChanged; private _startLimit_PMILLIS; private _endLimit_PMILLIS; private _start_PMILLIS; private _end_PMILLIS; private _label; private _labelIcon; private _userEditable; private _styleGuid; private _order; private _topMargin; private _bottomMargin; private _fgColor; private _bgColor; private _bgSecondaryColor; private _borderColor; private _borderSecondaryColor; private _labelTopMargin; private _labelBottomMargin; private _labelVAlign; private _labelVPos; private _labelHAlign; private _labelHPos; private _isBorderDashed; private _fillPattern; constructor(event: TimelineEvent); get eventGuid(): string; get attrsChanged(): Notification; setAttrs(event: TimelineEvent): void; setInterval(start_PMILLIS: number, end_PMILLIS: number): void; private limit_start_PMILLIS; private limit_end_PMILLIS; get start_PMILLIS(): number; set start_PMILLIS(start_PMILLIS: number); get end_PMILLIS(): number; set end_PMILLIS(end_PMILLIS: number); get startLimit_PMILLIS(): number; set startLimit_PMILLIS(startLimit_PMILLIS: number); get endLimit_PMILLIS(): number; set endLimit_PMILLIS(endLimit_PMILLIS: number); get label(): string; set label(label: string); get labelIcon(): string; set labelIcon(labelIcon: string); get userEditable(): boolean; set userEditable(userEditable: boolean); get styleGuid(): string; set styleGuid(styleGuid: string); get order(): number; set order(orderVal: number); get topMargin(): number; set topMargin(topMargin: number); get bottomMargin(): number; set bottomMargin(bottomMargin: number); get fgColor(): Color; set fgColor(fgColor: Color); get bgColor(): Color; set bgColor(bgColor: Color); get bgSecondaryColor(): Color; set bgSecondaryColor(bgSecondaryColor: Color); get borderColor(): Color; set borderColor(borderColor: Color); get borderSecondaryColor(): Color; set borderSecondaryColor(borderSecondaryColor: Color); get labelTopMargin(): number; set labelTopMargin(labelTopMargin: number); get labelBottomMargin(): number; set labelBottomMargin(labelBottomMargin: number); get labelVAlign(): number; set labelVAlign(labelVAlign: number); get labelVPos(): number; set labelVPos(labelVPos: number); get labelHAlign(): number; set labelHAlign(labelHAlign: number); get labelHPos(): number; set labelHPos(labelHPos: number); get isBorderDashed(): boolean; set isBorderDashed(isBorderDashed: boolean); get fillPattern(): FillPattern; set fillPattern(fillPattern: FillPattern); snapshot(): TimelineEvent; } export declare class TimelineRowModel { private _rowGuid; private _attrsChanged; private _rowHeight; private _hidden; private _label; private _truncate; private _uiHint; private _eventGuids; private _timeseriesGuids; private _annotationGuids; private _cursorGuid; private _fgLabelColor; private _bgLabelColor; private _labelFont; private _dataAxis; private _bgColor; private _cursor; private _highlighted; private _highlightColor; private _highlightWidth; private _highlightInsets; constructor(row: TimelineRow); get rowGuid(): string; get attrsChanged(): Notification; setAttrs(row: TimelineRow): void; get cursorGuid(): string; set cursorGuid(cursorGuid: string); get rowHeight(): number; set rowHeight(rowHeight: number); get hidden(): boolean; set hidden(hidden: boolean); get dataAxis(): Axis1D; set dataAxis(dataAxis: Axis1D); get label(): string; set label(label: string); get truncate(): boolean; set truncate(truncate: boolean); get uiHint(): string; set uiHint(uiHint: string); get bgColor(): Color; set bgColor(bgColor: Color); get bgLabelColor(): Color; set bgLabelColor(bgLabelColor: Color); get fgLabelColor(): Color; set fgLabelColor(fgLabelColor: Color); get labelFont(): string; set labelFont(labelFont: string); get cursor(): string; set cursor(cursor: string); get highlighted(): boolean; set highlighted(highlighted: boolean); get highlightColor(): Color; set highlightColor(highlightColor: Color); get highlightWidth(): number; set highlightWidth(highlightWidth: number); get highlightInsets(): Insets; set highlightInsets(highlightInsets: Insets); get eventGuids(): OrderedStringSet; get timeseriesGuids(): OrderedStringSet; get annotationGuids(): OrderedStringSet; snapshot(): TimelineRow; } export declare class TimelineGroupModel { private _groupGuid; private _rollupGuid; private _attrsChanged; private _hidden; private _label; private _collapsed; private _highlighted; private _highlightColor; private _highlightWidth; private _highlightInsets; private _dashPattern; private _dashLength; private _labelFont; private _rowGuids; private _cursor; constructor(group: TimelineGroup); get groupGuid(): string; get rollupGuid(): string; set rollupGuid(rollupGuid: string); get attrsChanged(): Notification; setAttrs(group: TimelineGroup): void; get hidden(): boolean; set hidden(hidden: boolean); get label(): string; set label(label: string); get collapsed(): boolean; set collapsed(collapsed: boolean); get highlighted(): boolean; set highlighted(highlighted: boolean); get highlightColor(): Color; set highlightColor(highlightColor: Color); get highlightWidth(): number; set highlightWidth(highlightWidth: number); get highlightInsets(): Insets; set highlightInsets(highlightInsets: Insets); get dashPattern(): number; set dashPattern(dashPattern: number); get dashLength(): number; set dashLength(dashLength: number); get labelFont(): string; set labelFont(labelFont: string); get cursor(): string; set cursor(cursor: string); get rowGuids(): OrderedStringSet; snapshot(): TimelineGroup; } export declare class TimelineRootModel { private _attrsChanged; private _groupGuids; private _topPinnedRowGuids; private _bottomPinnedRowGuids; private _maximizedRowGuids; constructor(root: TimelineRoot); get attrsChanged(): Notification; setAttrs(root: TimelineRoot): void; get groupGuids(): OrderedStringSet; get topPinnedRowGuids(): OrderedStringSet; get bottomPinnedRowGuids(): OrderedStringSet; get maximizedRowGuids(): OrderedStringSet; snapshot(): TimelineRoot; } export interface TimelineMergeStrategy { updateCursorModel(cursorModel: TimelineCursorModel, newCursor: TimelineCursor): void; updateAnnotationModel(annotationModel: TimelineAnnotationModel, newAnnotation: TimelineAnnotation): void; updateTimeseriesFragmentModel(timeseriesFragmentModel: TimelineTimeseriesFragmentModel, newTimeseriesFragment: TimelineTimeseriesFragment): void; updateTimeseriesModel(timeseriesModel: TimelineTimeseriesModel, newTimeseries: TimelineTimeseries): void; updateEventModel(eventModel: TimelineEventModel, newEvent: TimelineEvent): void; updateRowModel(rowModel: TimelineRowModel, newRow: TimelineRow): void; updateGroupModel(groupModel: TimelineGroupModel, newGroup: TimelineGroup): void; updateRootModel(rootModel: TimelineRootModel, newRoot: TimelineRoot): void; } export declare class TimelineModel { private _cursors; private _annotations; private _timeseriesFragments; private _timeseries; private _events; private _rows; private _groups; private _root; constructor(timeline?: Timeline); get cursors(): OrderedSet<TimelineCursorModel>; get annotations(): OrderedSet<TimelineAnnotationModel>; get timeseriesFragments(): OrderedSet<TimelineTimeseriesFragmentModel>; get timeseriesSets(): OrderedSet<TimelineTimeseriesModel>; get events(): OrderedSet<TimelineEventModel>; get rows(): OrderedSet<TimelineRowModel>; get groups(): OrderedSet<TimelineGroupModel>; get root(): TimelineRootModel; cursor(cursorGuid: string): TimelineCursorModel; annotation(annotationGuid: string): TimelineAnnotationModel; timeseriesFragment(fragmentGuid: string): TimelineTimeseriesFragmentModel; timeseries(timeseriesGuid: string): TimelineTimeseriesModel; event(eventGuid: string): TimelineEventModel; row(rowGuid: string): TimelineRowModel; group(groupGuid: string): TimelineGroupModel; replace(newTimeline: Timeline): void; merge(newData: Timeline, strategy: TimelineMergeStrategy): void; snapshot(): Timeline; } export declare function newEmptyTimelineRoot(): TimelineRoot; export declare let timelineMergeNewBeforeOld: TimelineMergeStrategy; export declare let timelineMergeNewAfterOld: TimelineMergeStrategy;