@tetacom/svg-charts 1.1.2 → 1.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/chart/base/series-base.component.d.ts +3 -1
- package/chart/chart/chart.component.d.ts +5 -2
- package/chart/chart-container/chart-container.component.d.ts +2 -0
- package/chart/chart-container/plotband/plot-band.component.d.ts +1 -0
- package/chart/chart-container/series/area-series/area-series.component.d.ts +31 -0
- package/chart/chart-container/series/bar/bar-series.component.d.ts +6 -6
- package/chart/chart-container/series/block-area-series/block-area-series.component.d.ts +28 -0
- package/chart/chart-container/series/block-series/block-series.component.d.ts +28 -0
- package/chart/chart-container/series/public-api.d.ts +6 -0
- package/chart/chart-container/series-host/series-host.component.d.ts +0 -1
- package/chart/chart-container/tooltip/tooltip.component.d.ts +4 -3
- package/chart/chart.module.d.ts +6 -3
- package/chart/default/default-chart-config.d.ts +1 -1
- package/chart/default/default-series-config.d.ts +1 -1
- package/chart/default/defaultSeriesTypeMapping.d.ts +3 -0
- package/chart/directives/brushable.directive.d.ts +2 -1
- package/chart/directives/zoomable.directive.d.ts +4 -2
- package/chart/model/axis-options.d.ts +1 -0
- package/chart/model/base-point.d.ts +3 -1
- package/chart/model/enum/fill-type.d.ts +4 -0
- package/chart/model/enum/public-api.d.ts +1 -0
- package/chart/model/enum/series-type.d.ts +4 -1
- package/chart/model/i-broadcast-message.d.ts +2 -1
- package/chart/model/i-chart-config.d.ts +3 -2
- package/chart/model/public-api.d.ts +1 -0
- package/chart/model/series.d.ts +2 -0
- package/chart/model/tooltip-options.d.ts +2 -1
- package/chart/service/brush.service.d.ts +2 -1
- package/chart/service/chart.service.d.ts +8 -0
- package/chart/service/public-api.d.ts +5 -0
- package/chart/service/zoom.service.d.ts +1 -1
- package/esm2020/chart/base/series-base.component.mjs +9 -2
- package/esm2020/chart/chart/chart.component.mjs +31 -7
- package/esm2020/chart/chart-container/chart-container.component.mjs +49 -14
- package/esm2020/chart/chart-container/gridlines/gridlines.component.mjs +3 -2
- package/esm2020/chart/chart-container/plotband/plot-band.component.mjs +14 -13
- package/esm2020/chart/chart-container/series/area-series/area-series.component.mjs +161 -0
- package/esm2020/chart/chart-container/series/bar/bar-series.component.mjs +23 -24
- package/esm2020/chart/chart-container/series/block-area-series/block-area-series.component.mjs +60 -0
- package/esm2020/chart/chart-container/series/block-series/block-series.component.mjs +60 -0
- package/esm2020/chart/chart-container/series/line/line-series.component.mjs +14 -5
- package/esm2020/chart/chart-container/series/public-api.mjs +7 -0
- package/esm2020/chart/chart-container/series/scatter-series/scatter-series.component.mjs +1 -74
- package/esm2020/chart/chart-container/series-host/series-host.component.mjs +3 -10
- package/esm2020/chart/chart-container/tooltip/tooltip.component.mjs +4 -4
- package/esm2020/chart/chart.module.mjs +28 -3
- package/esm2020/chart/default/default-axis-config.mjs +2 -1
- package/esm2020/chart/default/default-chart-config.mjs +3 -3
- package/esm2020/chart/default/default-series-config.mjs +6 -3
- package/esm2020/chart/default/defaultSeriesTypeMapping.mjs +15 -0
- package/esm2020/chart/directives/brushable.directive.mjs +5 -4
- package/esm2020/chart/directives/zoomable.directive.mjs +7 -4
- package/esm2020/chart/legend/legend.component.mjs +5 -2
- package/esm2020/chart/model/axis-options.mjs +1 -1
- package/esm2020/chart/model/base-point.mjs +1 -1
- package/esm2020/chart/model/enum/fill-type.mjs +6 -0
- package/esm2020/chart/model/enum/public-api.mjs +2 -1
- package/esm2020/chart/model/enum/series-type.mjs +5 -2
- package/esm2020/chart/model/i-broadcast-message.mjs +1 -1
- package/esm2020/chart/model/i-chart-config.mjs +1 -1
- package/esm2020/chart/model/public-api.mjs +2 -1
- package/esm2020/chart/model/series.mjs +1 -1
- package/esm2020/chart/model/tooltip-options.mjs +1 -1
- package/esm2020/chart/service/broadcast.service.mjs +3 -3
- package/esm2020/chart/service/brush.service.mjs +31 -13
- package/esm2020/chart/service/chart.service.mjs +42 -11
- package/esm2020/chart/service/public-api.mjs +6 -0
- package/esm2020/chart/service/scale.service.mjs +8 -2
- package/esm2020/chart/service/zoom.service.mjs +26 -29
- package/esm2020/public-api.mjs +5 -3
- package/fesm2015/tetacom-svg-charts.mjs +629 -283
- package/fesm2015/tetacom-svg-charts.mjs.map +1 -1
- package/fesm2020/tetacom-svg-charts.mjs +618 -274
- package/fesm2020/tetacom-svg-charts.mjs.map +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +4 -1
|
@@ -14,10 +14,12 @@ export declare class SeriesBaseComponent<T extends BasePoint> implements OnInit
|
|
|
14
14
|
protected zoomService: ZoomService;
|
|
15
15
|
protected element: ElementRef;
|
|
16
16
|
config: IChartConfig;
|
|
17
|
-
series: Series<T
|
|
17
|
+
set series(series: Series<T>);
|
|
18
|
+
get series(): Series<T>;
|
|
18
19
|
size: DOMRect;
|
|
19
20
|
rect: any;
|
|
20
21
|
zoom: Observable<any>;
|
|
22
|
+
protected _series: Series<T>;
|
|
21
23
|
constructor(svc: ChartService, cdr: ChangeDetectorRef, scaleService: ScaleService, zoomService: ZoomService, element: ElementRef);
|
|
22
24
|
ngOnInit(): void;
|
|
23
25
|
static ɵfac: i0.ɵɵFactoryDeclaration<SeriesBaseComponent<any>, never>;
|
|
@@ -17,9 +17,12 @@ export declare class ChartComponent implements OnInit, OnChanges, OnDestroy {
|
|
|
17
17
|
hasSeriesData: Observable<boolean>;
|
|
18
18
|
svcConfig: Observable<IChartConfig>;
|
|
19
19
|
plotBandsMove: EventEmitter<IChartEvent<PlotBand>>;
|
|
20
|
-
|
|
20
|
+
plotBandClick: EventEmitter<IChartEvent<PlotBand>>;
|
|
21
|
+
plotBandContextMenu: EventEmitter<IChartEvent<PlotBand>>;
|
|
21
22
|
plotLinesMove: EventEmitter<IChartEvent<PlotLine>>;
|
|
22
23
|
pointMove: EventEmitter<IChartEvent<IPointMove>>;
|
|
24
|
+
chartClick: EventEmitter<IChartEvent<BasePoint>>;
|
|
25
|
+
chartContextMenu: EventEmitter<IChartEvent<BasePoint>>;
|
|
23
26
|
set config(config: IChartConfig);
|
|
24
27
|
private _alive;
|
|
25
28
|
constructor(_svc: ChartService, _zoomService: ZoomService);
|
|
@@ -28,5 +31,5 @@ export declare class ChartComponent implements OnInit, OnChanges, OnDestroy {
|
|
|
28
31
|
ngAfterViewInit(): void;
|
|
29
32
|
ngOnDestroy(): void;
|
|
30
33
|
static ɵfac: i0.ɵɵFactoryDeclaration<ChartComponent, never>;
|
|
31
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ChartComponent, "teta-svg-chart", never, { "config": "config"; }, { "plotBandsMove": "plotBandsMove"; "
|
|
34
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChartComponent, "teta-svg-chart", never, { "config": "config"; }, { "plotBandsMove": "plotBandsMove"; "plotBandClick": "plotBandClick"; "plotBandContextMenu": "plotBandContextMenu"; "plotLinesMove": "plotLinesMove"; "pointMove": "pointMove"; "chartClick": "chartClick"; "chartContextMenu": "chartContextMenu"; }, never, never>;
|
|
32
35
|
}
|
|
@@ -29,6 +29,8 @@ export declare class ChartContainerComponent implements OnInit {
|
|
|
29
29
|
private sumSize;
|
|
30
30
|
getTranslate(axis?: Axis, size?: DOMRect): Observable<string>;
|
|
31
31
|
identify(index: any, item: any): any;
|
|
32
|
+
click(event: PointerEvent, xScales: Map<number, any>, yScales: Map<number, any>): void;
|
|
33
|
+
contextMenu(event: MouseEvent, xScales: Map<number, any>, yScales: Map<number, any>): void;
|
|
32
34
|
mouseMove(event: any): void;
|
|
33
35
|
mouseLeave(event: any): void;
|
|
34
36
|
id(): string;
|
|
@@ -21,6 +21,7 @@ export declare class PlotBandComponent implements AfterViewInit {
|
|
|
21
21
|
domain: number[];
|
|
22
22
|
constructor(scaleService: ScaleService, zoomService: ZoomService, chartService: ChartService, cdr: ChangeDetectorRef, element: ElementRef);
|
|
23
23
|
click(event: MouseEvent): void;
|
|
24
|
+
contextMenu(event: MouseEvent): void;
|
|
24
25
|
emit(event: IChartEvent<PlotBand>): void;
|
|
25
26
|
ngAfterViewInit(): void;
|
|
26
27
|
get bandSize(): number;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ChangeDetectorRef, ElementRef, OnInit } from '@angular/core';
|
|
2
|
+
import { SeriesBaseComponent } from '../../../base/series-base.component';
|
|
3
|
+
import { BasePoint } from '../../../model/base-point';
|
|
4
|
+
import { ChartService } from '../../../service/chart.service';
|
|
5
|
+
import { ScaleService } from '../../../service/scale.service';
|
|
6
|
+
import { ZoomService } from '../../../service/zoom.service';
|
|
7
|
+
import { Observable } from 'rxjs';
|
|
8
|
+
import { FillType } from '../../../model/enum/fill-type';
|
|
9
|
+
import * as i0 from "@angular/core";
|
|
10
|
+
export declare class AreaSeriesComponent<T extends BasePoint> extends SeriesBaseComponent<T> implements OnInit {
|
|
11
|
+
protected svc: ChartService;
|
|
12
|
+
protected cdr: ChangeDetectorRef;
|
|
13
|
+
protected scaleService: ScaleService;
|
|
14
|
+
protected zoomService: ZoomService;
|
|
15
|
+
protected element: ElementRef;
|
|
16
|
+
transform: Observable<Pick<BasePoint, 'x' | 'y'>>;
|
|
17
|
+
display: Observable<number>;
|
|
18
|
+
path: Observable<string>;
|
|
19
|
+
svgElement: SVGGeometryElement;
|
|
20
|
+
x: any;
|
|
21
|
+
y: any;
|
|
22
|
+
id: string;
|
|
23
|
+
fillType: typeof FillType;
|
|
24
|
+
constructor(svc: ChartService, cdr: ChangeDetectorRef, scaleService: ScaleService, zoomService: ZoomService, element: ElementRef);
|
|
25
|
+
ngOnInit(): void;
|
|
26
|
+
ngAfterViewInit(): void;
|
|
27
|
+
getMarkers(): T[];
|
|
28
|
+
getTransform(event: any, x: Map<number, any>, y: Map<number, any>): Pick<BasePoint, 'x' | 'y'>;
|
|
29
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AreaSeriesComponent<any>, never>;
|
|
30
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AreaSeriesComponent<any>, "svg:svg[teta-area-series]", never, {}, {}, never, never>;
|
|
31
|
+
}
|
|
@@ -4,6 +4,7 @@ import { BasePoint } from '../../../model/base-point';
|
|
|
4
4
|
import { ChartService } from '../../../service/chart.service';
|
|
5
5
|
import { ScaleService } from '../../../service/scale.service';
|
|
6
6
|
import { ZoomService } from '../../../service/zoom.service';
|
|
7
|
+
import { Observable } from 'rxjs';
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
export declare class BarSeriesComponent<T extends BasePoint> extends SeriesBaseComponent<T> implements OnInit, OnChanges {
|
|
9
10
|
protected svc: ChartService;
|
|
@@ -11,14 +12,13 @@ export declare class BarSeriesComponent<T extends BasePoint> extends SeriesBaseC
|
|
|
11
12
|
protected scaleService: ScaleService;
|
|
12
13
|
protected zoomService: ZoomService;
|
|
13
14
|
protected element: ElementRef;
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
x: Observable<any>;
|
|
16
|
+
x1: Observable<any>;
|
|
17
|
+
y: Observable<any>;
|
|
18
|
+
barSeriesCount: Observable<number>;
|
|
19
|
+
Math: any;
|
|
16
20
|
constructor(svc: ChartService, cdr: ChangeDetectorRef, scaleService: ScaleService, zoomService: ZoomService, element: ElementRef);
|
|
17
21
|
ngOnInit(): void;
|
|
18
|
-
width(): number;
|
|
19
|
-
height(point: BasePoint): number;
|
|
20
|
-
getX(point: BasePoint): number;
|
|
21
|
-
getY(point: BasePoint): any;
|
|
22
22
|
ngOnChanges(changes: SimpleChanges): void;
|
|
23
23
|
static ɵfac: i0.ɵɵFactoryDeclaration<BarSeriesComponent<any>, never>;
|
|
24
24
|
static ɵcmp: i0.ɵɵComponentDeclaration<BarSeriesComponent<any>, "svg:svg[teta-bar-series]", never, {}, {}, never, never>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { AfterViewInit, ChangeDetectorRef, ElementRef, OnInit } from '@angular/core';
|
|
2
|
+
import { SeriesBaseComponent } from '../../../base/series-base.component';
|
|
3
|
+
import { BasePoint } from '../../../model/base-point';
|
|
4
|
+
import { ChartService } from '../../../service/chart.service';
|
|
5
|
+
import { ScaleService } from '../../../service/scale.service';
|
|
6
|
+
import { ZoomService } from '../../../service/zoom.service';
|
|
7
|
+
import { Observable } from 'rxjs';
|
|
8
|
+
import { FillType } from '../../../model/enum/fill-type';
|
|
9
|
+
import * as i0 from "@angular/core";
|
|
10
|
+
export declare class BlockAreaSeriesComponent<T extends BasePoint> extends SeriesBaseComponent<T> implements OnInit, AfterViewInit {
|
|
11
|
+
protected svc: ChartService;
|
|
12
|
+
protected cdr: ChangeDetectorRef;
|
|
13
|
+
protected scaleService: ScaleService;
|
|
14
|
+
protected zoomService: ZoomService;
|
|
15
|
+
protected element: ElementRef;
|
|
16
|
+
x: Observable<any>;
|
|
17
|
+
y: Observable<any>;
|
|
18
|
+
displayPoints: Observable<BasePoint[]>;
|
|
19
|
+
fillType: typeof FillType;
|
|
20
|
+
id: string;
|
|
21
|
+
constructor(svc: ChartService, cdr: ChangeDetectorRef, scaleService: ScaleService, zoomService: ZoomService, element: ElementRef);
|
|
22
|
+
ngOnInit(): void;
|
|
23
|
+
ngAfterViewInit(): void;
|
|
24
|
+
mouseEnter(point: any): void;
|
|
25
|
+
mouseleave(point: any): void;
|
|
26
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BlockAreaSeriesComponent<any>, never>;
|
|
27
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BlockAreaSeriesComponent<any>, "svg:svg[teta-block-area-series]", never, {}, {}, never, never>;
|
|
28
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { AfterViewInit, ChangeDetectorRef, ElementRef, OnInit } from '@angular/core';
|
|
2
|
+
import { BasePoint } from '../../../model/base-point';
|
|
3
|
+
import { SeriesBaseComponent } from '../../../base/series-base.component';
|
|
4
|
+
import { Observable } from 'rxjs';
|
|
5
|
+
import { ChartService } from '../../../service/chart.service';
|
|
6
|
+
import { ScaleService } from '../../../service/scale.service';
|
|
7
|
+
import { ZoomService } from '../../../service/zoom.service';
|
|
8
|
+
import { FillType } from '../../../model/enum/fill-type';
|
|
9
|
+
import * as i0 from "@angular/core";
|
|
10
|
+
export declare class BlockSeriesComponent<T extends BasePoint> extends SeriesBaseComponent<T> implements OnInit, AfterViewInit {
|
|
11
|
+
protected svc: ChartService;
|
|
12
|
+
protected cdr: ChangeDetectorRef;
|
|
13
|
+
protected scaleService: ScaleService;
|
|
14
|
+
protected zoomService: ZoomService;
|
|
15
|
+
protected element: ElementRef;
|
|
16
|
+
x: Observable<any>;
|
|
17
|
+
y: Observable<any>;
|
|
18
|
+
displayPoints: Observable<BasePoint[]>;
|
|
19
|
+
fillType: typeof FillType;
|
|
20
|
+
id: string;
|
|
21
|
+
constructor(svc: ChartService, cdr: ChangeDetectorRef, scaleService: ScaleService, zoomService: ZoomService, element: ElementRef);
|
|
22
|
+
ngOnInit(): void;
|
|
23
|
+
mouseEnter(point: any): void;
|
|
24
|
+
mouseleave(point: any): void;
|
|
25
|
+
ngAfterViewInit(): void;
|
|
26
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BlockSeriesComponent<any>, never>;
|
|
27
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BlockSeriesComponent<any>, "svg:svg[teta-block-series]", never, {}, {}, never, never>;
|
|
28
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from './bar/bar-series.component';
|
|
2
|
+
export * from './block-area-series/block-area-series.component';
|
|
3
|
+
export * from './block-series/block-series.component';
|
|
4
|
+
export * from './line/line-series.component';
|
|
5
|
+
export * from './scatter-series/scatter-series.component';
|
|
6
|
+
export * from './area-series/area-series.component';
|
|
@@ -11,7 +11,6 @@ export declare class SeriesHostComponent<T extends BasePoint> implements OnInit
|
|
|
11
11
|
series: Series<T>;
|
|
12
12
|
size: DOMRect;
|
|
13
13
|
rect: any;
|
|
14
|
-
private defaultSeriesTypeMapping;
|
|
15
14
|
private _init;
|
|
16
15
|
private _componentRef;
|
|
17
16
|
constructor(viewContainerRef: ViewContainerRef, chartService: ChartService);
|
|
@@ -2,7 +2,8 @@ import { ChangeDetectorRef, NgZone, OnDestroy, OnInit } from '@angular/core';
|
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { ChartService } from '../../service/chart.service';
|
|
4
4
|
import { ZoomService } from '../../service/zoom.service';
|
|
5
|
-
import {
|
|
5
|
+
import { IDisplayTooltip } from '../../model/i-display-tooltip';
|
|
6
|
+
import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
|
|
6
7
|
import { IChartConfig } from '../../model/i-chart-config';
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
export declare class TooltipComponent implements OnInit, OnDestroy {
|
|
@@ -19,8 +20,8 @@ export declare class TooltipComponent implements OnInit, OnDestroy {
|
|
|
19
20
|
bottom: string;
|
|
20
21
|
right: string;
|
|
21
22
|
}>;
|
|
22
|
-
displayTooltips: Observable<
|
|
23
|
-
tooltips:
|
|
23
|
+
displayTooltips: Observable<SafeHtml>;
|
|
24
|
+
tooltips: IDisplayTooltip[];
|
|
24
25
|
private alive;
|
|
25
26
|
display: Observable<number>;
|
|
26
27
|
constructor(svc: ChartService, cdr: ChangeDetectorRef, zoomService: ZoomService, sanitizer: DomSanitizer, _zone: NgZone);
|
package/chart/chart.module.d.ts
CHANGED
|
@@ -14,10 +14,13 @@ import * as i12 from "./chart-container/series/bar/bar-series.component";
|
|
|
14
14
|
import * as i13 from "./chart-container/tooltip/tooltip.component";
|
|
15
15
|
import * as i14 from "./directives/zoomable.directive";
|
|
16
16
|
import * as i15 from "./directives/brushable.directive";
|
|
17
|
-
import * as i16 from "./chart-container/series/
|
|
18
|
-
import * as i17 from "
|
|
17
|
+
import * as i16 from "./chart-container/series/area-series/area-series.component";
|
|
18
|
+
import * as i17 from "./chart-container/series/scatter-series/scatter-series.component";
|
|
19
|
+
import * as i18 from "./chart-container/series/block-series/block-series.component";
|
|
20
|
+
import * as i19 from "./chart-container/series/block-area-series/block-area-series.component";
|
|
21
|
+
import * as i20 from "@angular/common";
|
|
19
22
|
export declare class ChartModule {
|
|
20
23
|
static ɵfac: i0.ɵɵFactoryDeclaration<ChartModule, never>;
|
|
21
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<ChartModule, [typeof i1.ChartComponent, typeof i2.SeriesHostComponent, typeof i3.ChartContainerComponent, typeof i4.LegendComponent, typeof i5.SeriesBaseComponent, typeof i6.LineSeriesComponent, typeof i7.GridlinesComponent, typeof i8.XAxisComponent, typeof i9.YAxisComponent, typeof i10.PlotlineComponent, typeof i11.PlotBandComponent, typeof i12.BarSeriesComponent, typeof i13.TooltipComponent, typeof i14.ZoomableDirective, typeof i15.BrushableDirective, typeof i16.ScatterSeriesComponent], [typeof
|
|
24
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ChartModule, [typeof i1.ChartComponent, typeof i2.SeriesHostComponent, typeof i3.ChartContainerComponent, typeof i4.LegendComponent, typeof i5.SeriesBaseComponent, typeof i6.LineSeriesComponent, typeof i7.GridlinesComponent, typeof i8.XAxisComponent, typeof i9.YAxisComponent, typeof i10.PlotlineComponent, typeof i11.PlotBandComponent, typeof i12.BarSeriesComponent, typeof i13.TooltipComponent, typeof i14.ZoomableDirective, typeof i15.BrushableDirective, typeof i16.AreaSeriesComponent, typeof i17.ScatterSeriesComponent, typeof i18.BlockSeriesComponent, typeof i19.BlockAreaSeriesComponent], [typeof i20.CommonModule], [typeof i1.ChartComponent, typeof i5.SeriesBaseComponent, typeof i6.LineSeriesComponent, typeof i12.BarSeriesComponent, typeof i17.ScatterSeriesComponent, typeof i16.AreaSeriesComponent, typeof i18.BlockSeriesComponent, typeof i19.BlockAreaSeriesComponent]>;
|
|
22
25
|
static ɵinj: i0.ɵɵInjectorDeclaration<ChartModule>;
|
|
23
26
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { IChartConfig } from '../model/i-chart-config';
|
|
2
|
-
export declare const defaultChartConfig: IChartConfig;
|
|
2
|
+
export declare const defaultChartConfig: () => IChartConfig;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AfterViewInit, ElementRef, OnInit } from '@angular/core';
|
|
1
|
+
import { AfterViewInit, ElementRef, OnInit, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { IChartConfig } from '../model/i-chart-config';
|
|
3
3
|
import { BrushService } from '../service/brush.service';
|
|
4
4
|
import { ChartService } from '../service/chart.service';
|
|
@@ -13,6 +13,7 @@ export declare class BrushableDirective implements OnInit, AfterViewInit {
|
|
|
13
13
|
constructor(brushService: BrushService, chartService: ChartService, element: ElementRef);
|
|
14
14
|
ngOnInit(): void;
|
|
15
15
|
ngAfterViewInit(): void;
|
|
16
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
16
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<BrushableDirective, never>;
|
|
17
18
|
static ɵdir: i0.ɵɵDirectiveDeclaration<BrushableDirective, "svg:svg[tetaBrushable]", never, { "config": "config"; "size": "size"; "brushScale": "brushScale"; }, {}, never>;
|
|
18
19
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ElementRef } from '@angular/core';
|
|
1
|
+
import { ElementRef, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { ZoomService } from '../service/zoom.service';
|
|
3
3
|
import { IChartConfig } from '../model/i-chart-config';
|
|
4
4
|
import { Axis } from '../core/axis/axis';
|
|
@@ -9,10 +9,12 @@ export declare class ZoomableDirective {
|
|
|
9
9
|
config?: IChartConfig;
|
|
10
10
|
axis?: Axis;
|
|
11
11
|
size?: DOMRect;
|
|
12
|
+
brushScale?: any;
|
|
12
13
|
private zoomable;
|
|
13
14
|
constructor(element: ElementRef, svc: ZoomService);
|
|
14
15
|
ngOnInit(): void;
|
|
15
16
|
ngAfterViewInit(): void;
|
|
17
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
16
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<ZoomableDirective, never>;
|
|
17
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<ZoomableDirective, "[tetaZoomable]", never, { "config": "config"; "axis": "axis"; "size": "size"; }, {}, never>;
|
|
19
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ZoomableDirective, "[tetaZoomable]", never, { "config": "config"; "axis": "axis"; "size": "size"; "brushScale": "brushScale"; }, {}, never>;
|
|
18
20
|
}
|
|
@@ -4,12 +4,13 @@ import { BrushType } from './enum/brush-type';
|
|
|
4
4
|
export interface ZoomMessage {
|
|
5
5
|
event: D3ZoomEvent<any, any>;
|
|
6
6
|
axis?: Axis;
|
|
7
|
+
brushDomain?: number[];
|
|
7
8
|
}
|
|
8
9
|
export interface BrushMessage {
|
|
9
10
|
event: D3BrushEvent<any>;
|
|
10
11
|
brushType: BrushType;
|
|
11
12
|
selection: number[];
|
|
12
|
-
brushScale
|
|
13
|
+
brushScale?: any;
|
|
13
14
|
}
|
|
14
15
|
export interface IBroadcastMessage {
|
|
15
16
|
channel: string;
|
|
@@ -6,6 +6,7 @@ export * from './i-broadcast-message';
|
|
|
6
6
|
export * from './i-chart-config';
|
|
7
7
|
export * from './i-chart-event';
|
|
8
8
|
export * from './i-point-move';
|
|
9
|
+
export * from './i-display-tooltip';
|
|
9
10
|
export * from './marker-options';
|
|
10
11
|
export * from './plot-band';
|
|
11
12
|
export * from './plot-line';
|
package/chart/model/series.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { BasePoint } from './base-point';
|
|
|
2
2
|
import { SeriesType } from './enum/series-type';
|
|
3
3
|
import { SeriesBaseComponent } from '../base/series-base.component';
|
|
4
4
|
import { SvgAttributes } from './svg-attributes';
|
|
5
|
+
import { FillType } from './enum/fill-type';
|
|
5
6
|
export interface Series<T extends BasePoint> {
|
|
6
7
|
id?: number | string;
|
|
7
8
|
type: SeriesType;
|
|
@@ -12,6 +13,7 @@ export interface Series<T extends BasePoint> {
|
|
|
12
13
|
component?: typeof SeriesBaseComponent;
|
|
13
14
|
visible?: boolean;
|
|
14
15
|
color?: string;
|
|
16
|
+
fillType?: FillType;
|
|
15
17
|
showInLegend?: boolean;
|
|
16
18
|
style?: SvgAttributes;
|
|
17
19
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { TooltipTracking } from './enum/tooltip-tracking';
|
|
2
|
+
import { IDisplayTooltip } from './i-display-tooltip';
|
|
2
3
|
export interface TooltipOptions {
|
|
3
4
|
enable?: boolean;
|
|
4
5
|
showMarkers?: boolean;
|
|
5
6
|
showLine?: boolean;
|
|
6
7
|
tracking?: TooltipTracking;
|
|
7
|
-
format?: (data:
|
|
8
|
+
format?: (data: IDisplayTooltip[]) => string;
|
|
8
9
|
}
|
|
@@ -6,9 +6,10 @@ import * as i0 from "@angular/core";
|
|
|
6
6
|
export declare class BrushService {
|
|
7
7
|
private broadcastService;
|
|
8
8
|
broadcastSubscribtion: Subscription;
|
|
9
|
+
private brush;
|
|
9
10
|
private brushMap;
|
|
10
11
|
constructor(broadcastService: BroadcastService);
|
|
11
|
-
applyBrush(svgElement: ElementRef, config: IChartConfig, brushScale: any): void;
|
|
12
|
+
applyBrush(svgElement: ElementRef, config: IChartConfig, brushScale: any, size: DOMRect): void;
|
|
12
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<BrushService, never>;
|
|
13
14
|
static ɵprov: i0.ɵɵInjectableDeclaration<BrushService>;
|
|
14
15
|
}
|
|
@@ -5,6 +5,7 @@ import { IDisplayTooltip } from '../model/i-display-tooltip';
|
|
|
5
5
|
import { PlotBand } from '../model/plot-band';
|
|
6
6
|
import { PlotLine } from '../model/plot-line';
|
|
7
7
|
import { IPointMove } from '../model/i-point-move';
|
|
8
|
+
import { BasePoint } from '../model/base-point';
|
|
8
9
|
import * as i0 from "@angular/core";
|
|
9
10
|
export declare class ChartService {
|
|
10
11
|
config: Observable<IChartConfig>;
|
|
@@ -14,7 +15,10 @@ export declare class ChartService {
|
|
|
14
15
|
plotBandEvent: Observable<IChartEvent<PlotBand>>;
|
|
15
16
|
plotLineMove: Observable<IChartEvent<PlotLine>>;
|
|
16
17
|
plotBandClick: Observable<IChartEvent<PlotBand>>;
|
|
18
|
+
plotBandContextMenu: Observable<IChartEvent<PlotBand>>;
|
|
17
19
|
pointMove: Observable<IChartEvent<IPointMove>>;
|
|
20
|
+
chartClick: Observable<IChartEvent<BasePoint>>;
|
|
21
|
+
chartContextMenu: Observable<IChartEvent<BasePoint>>;
|
|
18
22
|
private config$;
|
|
19
23
|
private size$;
|
|
20
24
|
private pointerMove$;
|
|
@@ -22,6 +26,8 @@ export declare class ChartService {
|
|
|
22
26
|
private plotBandEvent$;
|
|
23
27
|
private plotLineMove$;
|
|
24
28
|
private pointMove$;
|
|
29
|
+
private chartClick$;
|
|
30
|
+
private chartContextMenu$;
|
|
25
31
|
constructor();
|
|
26
32
|
setConfig(config: IChartConfig): void;
|
|
27
33
|
setSize(size: DOMRect): void;
|
|
@@ -30,6 +36,8 @@ export declare class ChartService {
|
|
|
30
36
|
emitPlotband(event: IChartEvent<PlotBand>): void;
|
|
31
37
|
emitPlotline(event: IChartEvent<PlotLine>): void;
|
|
32
38
|
emitPoint(event: IChartEvent<IPointMove>): void;
|
|
39
|
+
emitChartClick(event: IChartEvent<BasePoint>): void;
|
|
40
|
+
emitChartContextMenu(event: IChartEvent<BasePoint>): void;
|
|
33
41
|
private setDefaults;
|
|
34
42
|
private setpreparationData;
|
|
35
43
|
static ɵfac: i0.ɵɵFactoryDeclaration<ChartService, never>;
|
|
@@ -11,7 +11,7 @@ export declare class ZoomService {
|
|
|
11
11
|
zoomed: Observable<IChartEvent<Axis>>;
|
|
12
12
|
private zoomed$;
|
|
13
13
|
constructor(broadcastService: BroadcastService);
|
|
14
|
-
applyZoom(svgElement: ElementRef, config: IChartConfig, size: DOMRect, axis?: Axis): void;
|
|
14
|
+
applyZoom(svgElement: ElementRef, config: IChartConfig, size: DOMRect, axis?: Axis, brushScale?: any): void;
|
|
15
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<ZoomService, never>;
|
|
16
16
|
static ɵprov: i0.ɵɵInjectableDeclaration<ZoomService>;
|
|
17
17
|
}
|
|
@@ -11,7 +11,14 @@ export class SeriesBaseComponent {
|
|
|
11
11
|
this.zoomService = zoomService;
|
|
12
12
|
this.element = element;
|
|
13
13
|
}
|
|
14
|
-
|
|
14
|
+
set series(series) {
|
|
15
|
+
this._series = series;
|
|
16
|
+
}
|
|
17
|
+
get series() {
|
|
18
|
+
return this._series;
|
|
19
|
+
}
|
|
20
|
+
ngOnInit() {
|
|
21
|
+
}
|
|
15
22
|
}
|
|
16
23
|
SeriesBaseComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.1", ngImport: i0, type: SeriesBaseComponent, deps: [{ token: i1.ChartService }, { token: i0.ChangeDetectorRef }, { token: i2.ScaleService }, { token: i3.ZoomService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
17
24
|
SeriesBaseComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.1", type: SeriesBaseComponent, selector: "ng-component", inputs: { config: "config", series: "series", size: "size", rect: "rect" }, ngImport: i0, template: '', isInline: true });
|
|
@@ -29,4 +36,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.1", ngImpor
|
|
|
29
36
|
}], rect: [{
|
|
30
37
|
type: Input
|
|
31
38
|
}] } });
|
|
32
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
39
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VyaWVzLWJhc2UuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2NoYXJ0L2Jhc2Uvc2VyaWVzLWJhc2UuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFFTCxTQUFTLEVBRVQsS0FBSyxHQUVOLE1BQU0sZUFBZSxDQUFDOzs7OztBQVl2QixNQUFNLE9BQU8sb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