@tetacom/svg-charts 1.4.21 → 1.4.23
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 +1 -1
- package/chart/chart/chart.component.d.ts +1 -1
- package/chart/chart-container/annotation/annotation.component.d.ts +1 -1
- package/chart/chart-container/chart-container.component.d.ts +1 -1
- package/chart/chart-container/crosshair/crosshair.component.d.ts +1 -1
- package/chart/chart-container/gridlines/gridlines.component.d.ts +1 -1
- package/chart/chart-container/plotband/plot-band.component.d.ts +1 -1
- package/chart/chart-container/plotline/plotline.component.d.ts +1 -1
- package/chart/chart-container/series/area-series/area-series.component.d.ts +1 -1
- package/chart/chart-container/series/bar/bar-series.component.d.ts +1 -1
- package/chart/chart-container/series/block-area-series/block-area-series.component.d.ts +1 -1
- package/chart/chart-container/series/block-series/block-series.component.d.ts +1 -1
- package/chart/chart-container/series/line/line-series.component.d.ts +1 -1
- package/chart/chart-container/series/linear-series-base.d.ts +1 -1
- package/chart/chart-container/series/scatter-series/scatter-series.component.d.ts +1 -1
- package/chart/chart-container/series-host/series-host.component.d.ts +1 -1
- package/chart/chart-container/tooltip/tooltip.component.d.ts +1 -1
- package/chart/chart-container/x-axis/x-axis.component.d.ts +1 -1
- package/chart/chart-container/y-axis/y-axis.component.d.ts +1 -1
- package/chart/directives/brushable.directive.d.ts +1 -1
- package/chart/directives/draggable-point.directive.d.ts +1 -1
- package/chart/directives/zoomable.directive.d.ts +1 -1
- package/chart/legend/legend.component.d.ts +1 -1
- package/chart/model/i-broadcast-message.d.ts +2 -2
- package/chart/stories/bandseries/bandseries.component.d.ts +1 -1
- package/esm2022/chart/base/series-base.component.mjs +50 -0
- package/esm2022/chart/chart/chart.component.mjs +175 -0
- package/esm2022/chart/chart-container/annotation/annotation.component.mjs +108 -0
- package/esm2022/chart/chart-container/chart-container.component.mjs +194 -0
- package/esm2022/chart/chart-container/crosshair/crosshair.component.mjs +39 -0
- package/esm2022/chart/chart-container/gridlines/gridlines.component.mjs +45 -0
- package/esm2022/chart/chart-container/plotband/plot-band.component.mjs +174 -0
- package/esm2022/chart/chart-container/plotline/plotline.component.mjs +98 -0
- package/esm2022/chart/chart-container/series/area-series/area-series.component.mjs +74 -0
- package/esm2022/chart/chart-container/series/bar/bar-series.component.mjs +68 -0
- package/esm2022/chart/chart-container/series/block-area-series/block-area-series.component.mjs +69 -0
- package/esm2022/chart/chart-container/series/block-series/block-series.component.mjs +69 -0
- package/{esm2020 → esm2022}/chart/chart-container/series/line/line-series.component.mjs +37 -30
- package/esm2022/chart/chart-container/series/linear-series-base.mjs +210 -0
- package/esm2022/chart/chart-container/series/scatter-series/scatter-series.component.mjs +53 -0
- package/esm2022/chart/chart-container/series-host/series-host.component.mjs +50 -0
- package/{esm2020 → esm2022}/chart/chart-container/tooltip/tooltip.component.mjs +18 -5
- package/esm2022/chart/chart-container/x-axis/x-axis.component.mjs +54 -0
- package/esm2022/chart/chart-container/y-axis/y-axis.component.mjs +40 -0
- package/{esm2020 → esm2022}/chart/chart.module.mjs +36 -36
- package/esm2022/chart/core/axis/axis.mjs +135 -0
- package/esm2022/chart/core/axis/builders/axis-size-builder.mjs +31 -0
- package/esm2022/chart/core/axis/builders/extremes-builder.mjs +33 -0
- package/esm2022/chart/directives/brushable.directive.mjs +162 -0
- package/esm2022/chart/directives/draggable-point.directive.mjs +147 -0
- package/esm2022/chart/directives/zoomable.directive.mjs +263 -0
- package/esm2022/chart/legend/legend.component.mjs +38 -0
- package/{esm2020 → esm2022}/chart/model/chart-bounds.mjs +5 -5
- package/esm2022/chart/model/i-broadcast-message.mjs +27 -0
- package/esm2022/chart/model/plot-band.mjs +28 -0
- package/esm2022/chart/model/plot-line.mjs +21 -0
- package/esm2022/chart/service/broadcast.service.mjs +24 -0
- package/esm2022/chart/service/brush.service.mjs +22 -0
- package/esm2022/chart/service/chart.service.mjs +244 -0
- package/esm2022/chart/service/scale.service.mjs +206 -0
- package/esm2022/chart/service/zoom.service.mjs +85 -0
- package/esm2022/chart/stories/bandseries/bandseries.component.mjs +36 -0
- package/{fesm2020 → fesm2022}/tetacom-svg-charts.mjs +584 -338
- package/fesm2022/tetacom-svg-charts.mjs.map +1 -0
- package/package.json +8 -14
- package/esm2020/chart/base/series-base.component.mjs +0 -42
- package/esm2020/chart/chart/chart.component.mjs +0 -172
- package/esm2020/chart/chart-container/annotation/annotation.component.mjs +0 -99
- package/esm2020/chart/chart-container/chart-container.component.mjs +0 -182
- package/esm2020/chart/chart-container/crosshair/crosshair.component.mjs +0 -34
- package/esm2020/chart/chart-container/gridlines/gridlines.component.mjs +0 -37
- package/esm2020/chart/chart-container/plotband/plot-band.component.mjs +0 -163
- package/esm2020/chart/chart-container/plotline/plotline.component.mjs +0 -87
- package/esm2020/chart/chart-container/series/area-series/area-series.component.mjs +0 -67
- package/esm2020/chart/chart-container/series/bar/bar-series.component.mjs +0 -59
- package/esm2020/chart/chart-container/series/block-area-series/block-area-series.component.mjs +0 -60
- package/esm2020/chart/chart-container/series/block-series/block-series.component.mjs +0 -60
- package/esm2020/chart/chart-container/series/linear-series-base.mjs +0 -198
- package/esm2020/chart/chart-container/series/scatter-series/scatter-series.component.mjs +0 -43
- package/esm2020/chart/chart-container/series-host/series-host.component.mjs +0 -46
- package/esm2020/chart/chart-container/x-axis/x-axis.component.mjs +0 -48
- package/esm2020/chart/chart-container/y-axis/y-axis.component.mjs +0 -36
- package/esm2020/chart/core/axis/axis.mjs +0 -128
- package/esm2020/chart/core/axis/builders/axis-size-builder.mjs +0 -33
- package/esm2020/chart/core/axis/builders/extremes-builder.mjs +0 -35
- package/esm2020/chart/directives/brushable.directive.mjs +0 -153
- package/esm2020/chart/directives/draggable-point.directive.mjs +0 -141
- package/esm2020/chart/directives/zoomable.directive.mjs +0 -254
- package/esm2020/chart/legend/legend.component.mjs +0 -36
- package/esm2020/chart/model/i-broadcast-message.mjs +0 -18
- package/esm2020/chart/model/plot-band.mjs +0 -17
- package/esm2020/chart/model/plot-line.mjs +0 -13
- package/esm2020/chart/service/broadcast.service.mjs +0 -23
- package/esm2020/chart/service/brush.service.mjs +0 -21
- package/esm2020/chart/service/chart.service.mjs +0 -229
- package/esm2020/chart/service/scale.service.mjs +0 -203
- package/esm2020/chart/service/zoom.service.mjs +0 -80
- package/esm2020/chart/stories/bandseries/bandseries.component.mjs +0 -29
- package/fesm2015/tetacom-svg-charts.mjs +0 -3095
- package/fesm2015/tetacom-svg-charts.mjs.map +0 -1
- package/fesm2020/tetacom-svg-charts.mjs.map +0 -1
- /package/{esm2020 → esm2022}/chart/chart-container/series/public-api.mjs +0 -0
- /package/{esm2020 → esm2022}/chart/core/axis/builders/public-api.mjs +0 -0
- /package/{esm2020 → esm2022}/chart/core/utils/generate-ticks.mjs +0 -0
- /package/{esm2020 → esm2022}/chart/core/utils/get-text-width.mjs +0 -0
- /package/{esm2020 → esm2022}/chart/core/utils/public-api.mjs +0 -0
- /package/{esm2020 → esm2022}/chart/default/default-axis-config.mjs +0 -0
- /package/{esm2020 → esm2022}/chart/default/default-chart-config.mjs +0 -0
- /package/{esm2020 → esm2022}/chart/default/default-series-config.mjs +0 -0
- /package/{esm2020 → esm2022}/chart/default/defaultSeriesTypeMapping.mjs +0 -0
- /package/{esm2020 → esm2022}/chart/model/annotation.mjs +0 -0
- /package/{esm2020 → esm2022}/chart/model/axis-options.mjs +0 -0
- /package/{esm2020 → esm2022}/chart/model/base-point.mjs +0 -0
- /package/{esm2020 → esm2022}/chart/model/enum/axis-orientation.mjs +0 -0
- /package/{esm2020 → esm2022}/chart/model/enum/brush-type.mjs +0 -0
- /package/{esm2020 → esm2022}/chart/model/enum/clip-points-direction.mjs +0 -0
- /package/{esm2020 → esm2022}/chart/model/enum/drag-point-type.mjs +0 -0
- /package/{esm2020 → esm2022}/chart/model/enum/fill-type.mjs +0 -0
- /package/{esm2020 → esm2022}/chart/model/enum/public-api.mjs +0 -0
- /package/{esm2020 → esm2022}/chart/model/enum/scale-type.mjs +0 -0
- /package/{esm2020 → esm2022}/chart/model/enum/series-type.mjs +0 -0
- /package/{esm2020 → esm2022}/chart/model/enum/tooltip-tracking.mjs +0 -0
- /package/{esm2020 → esm2022}/chart/model/enum/zoom-behavior-type.mjs +0 -0
- /package/{esm2020 → esm2022}/chart/model/enum/zoom-type.mjs +0 -0
- /package/{esm2020 → esm2022}/chart/model/i-builder.mjs +0 -0
- /package/{esm2020 → esm2022}/chart/model/i-chart-config.mjs +0 -0
- /package/{esm2020 → esm2022}/chart/model/i-chart-event.mjs +0 -0
- /package/{esm2020 → esm2022}/chart/model/i-display-tooltip.mjs +0 -0
- /package/{esm2020 → esm2022}/chart/model/i-point-move.mjs +0 -0
- /package/{esm2020 → esm2022}/chart/model/i-scales-map.mjs +0 -0
- /package/{esm2020 → esm2022}/chart/model/marker-options.mjs +0 -0
- /package/{esm2020 → esm2022}/chart/model/public-api.mjs +0 -0
- /package/{esm2020 → esm2022}/chart/model/series.mjs +0 -0
- /package/{esm2020 → esm2022}/chart/model/svg-attributes.mjs +0 -0
- /package/{esm2020 → esm2022}/chart/model/tooltip-options.mjs +0 -0
- /package/{esm2020 → esm2022}/chart/service/public-api.mjs +0 -0
- /package/{esm2020 → esm2022}/public-api.mjs +0 -0
- /package/{esm2020 → esm2022}/tetacom-svg-charts.mjs +0 -0
|
@@ -18,11 +18,11 @@ var ZoomType;
|
|
|
18
18
|
})(ZoomType || (ZoomType = {}));
|
|
19
19
|
|
|
20
20
|
class ChartBounds {
|
|
21
|
+
top = 0;
|
|
22
|
+
right = 0;
|
|
23
|
+
bottom = 0;
|
|
24
|
+
left = 0;
|
|
21
25
|
constructor(options) {
|
|
22
|
-
this.top = 0;
|
|
23
|
-
this.right = 0;
|
|
24
|
-
this.bottom = 0;
|
|
25
|
-
this.left = 0;
|
|
26
26
|
this.top = options?.top || 0;
|
|
27
27
|
this.right = options?.right || 0;
|
|
28
28
|
this.bottom = options?.bottom || 0;
|
|
@@ -137,18 +137,34 @@ const defaultSeriesConfig = () => ({
|
|
|
137
137
|
});
|
|
138
138
|
|
|
139
139
|
class ChartService {
|
|
140
|
+
id;
|
|
141
|
+
config;
|
|
142
|
+
size;
|
|
143
|
+
pointerMove;
|
|
144
|
+
tooltips;
|
|
145
|
+
plotBandEvent;
|
|
146
|
+
plotLineMove;
|
|
147
|
+
plotBandClick;
|
|
148
|
+
plotBandContextMenu;
|
|
149
|
+
pointMove;
|
|
150
|
+
annotationMove;
|
|
151
|
+
annotationClick;
|
|
152
|
+
annotationContextMenu;
|
|
153
|
+
chartClick;
|
|
154
|
+
chartContextMenu;
|
|
155
|
+
config$ = new BehaviorSubject(defaultChartConfig());
|
|
156
|
+
size$ = new BehaviorSubject(null);
|
|
157
|
+
pointerMove$ = new Subject();
|
|
158
|
+
tooltips$ = new BehaviorSubject(new Map());
|
|
159
|
+
plotBandEvent$ = new Subject();
|
|
160
|
+
plotLineMove$ = new Subject();
|
|
161
|
+
pointMove$ = new Subject();
|
|
162
|
+
chartClick$ = new Subject();
|
|
163
|
+
chartContextMenu$ = new Subject();
|
|
164
|
+
annotationEvent$ = new Subject();
|
|
165
|
+
annotationMove$ = new Subject();
|
|
166
|
+
static _hiddenSeriesPostfix = 'hidden_series';
|
|
140
167
|
constructor() {
|
|
141
|
-
this.config$ = new BehaviorSubject(defaultChartConfig());
|
|
142
|
-
this.size$ = new BehaviorSubject(null);
|
|
143
|
-
this.pointerMove$ = new Subject();
|
|
144
|
-
this.tooltips$ = new BehaviorSubject(new Map());
|
|
145
|
-
this.plotBandEvent$ = new Subject();
|
|
146
|
-
this.plotLineMove$ = new Subject();
|
|
147
|
-
this.pointMove$ = new Subject();
|
|
148
|
-
this.chartClick$ = new Subject();
|
|
149
|
-
this.chartContextMenu$ = new Subject();
|
|
150
|
-
this.annotationEvent$ = new Subject();
|
|
151
|
-
this.annotationMove$ = new Subject();
|
|
152
168
|
this.id = of((Date.now() + Math.random()).toString(36));
|
|
153
169
|
this.config = this.config$.asObservable().pipe(withLatestFrom(this.id), map(this.setDefaults), map(this.setPreparationData), map(this.restoreLocalStorage), shareReplay({
|
|
154
170
|
bufferSize: 1,
|
|
@@ -347,11 +363,10 @@ class ChartService {
|
|
|
347
363
|
}
|
|
348
364
|
return config;
|
|
349
365
|
}
|
|
366
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ChartService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
367
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ChartService, providedIn: 'root' });
|
|
350
368
|
}
|
|
351
|
-
|
|
352
|
-
ChartService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: ChartService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
353
|
-
ChartService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: ChartService, providedIn: 'root' });
|
|
354
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: ChartService, decorators: [{
|
|
369
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ChartService, decorators: [{
|
|
355
370
|
type: Injectable,
|
|
356
371
|
args: [{
|
|
357
372
|
providedIn: 'root',
|
|
@@ -365,6 +380,7 @@ var AxisOrientation;
|
|
|
365
380
|
})(AxisOrientation || (AxisOrientation = {}));
|
|
366
381
|
|
|
367
382
|
class BroadcastService {
|
|
383
|
+
zoomEmitter;
|
|
368
384
|
constructor() {
|
|
369
385
|
this.zoomEmitter = new ReplaySubject(1);
|
|
370
386
|
}
|
|
@@ -374,10 +390,10 @@ class BroadcastService {
|
|
|
374
390
|
subscribeToZoom(channel) {
|
|
375
391
|
return this.zoomEmitter.asObservable().pipe(filter((msg) => channel && msg.channel === channel));
|
|
376
392
|
}
|
|
393
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: BroadcastService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
394
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: BroadcastService, providedIn: 'root' });
|
|
377
395
|
}
|
|
378
|
-
|
|
379
|
-
BroadcastService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: BroadcastService, providedIn: 'root' });
|
|
380
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: BroadcastService, decorators: [{
|
|
396
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: BroadcastService, decorators: [{
|
|
381
397
|
type: Injectable,
|
|
382
398
|
args: [{
|
|
383
399
|
providedIn: 'root',
|
|
@@ -385,10 +401,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
385
401
|
}], ctorParameters: function () { return []; } });
|
|
386
402
|
|
|
387
403
|
class ZoomService {
|
|
404
|
+
_broadcast;
|
|
405
|
+
_chart;
|
|
406
|
+
zoomed;
|
|
407
|
+
zoomed$ = new BehaviorSubject(null);
|
|
408
|
+
broadcastChannel;
|
|
409
|
+
broadcastSub;
|
|
388
410
|
constructor(_broadcast, _chart) {
|
|
389
411
|
this._broadcast = _broadcast;
|
|
390
412
|
this._chart = _chart;
|
|
391
|
-
this.zoomed$ = new BehaviorSubject(null);
|
|
392
413
|
this.zoomed = this.zoomed$.asObservable().pipe(shareReplay({
|
|
393
414
|
bufferSize: 1,
|
|
394
415
|
refCount: true
|
|
@@ -446,10 +467,10 @@ class ZoomService {
|
|
|
446
467
|
ngOnDestroy() {
|
|
447
468
|
this.broadcastSub?.unsubscribe();
|
|
448
469
|
}
|
|
470
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ZoomService, deps: [{ token: BroadcastService }, { token: ChartService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
471
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ZoomService, providedIn: 'root' });
|
|
449
472
|
}
|
|
450
|
-
|
|
451
|
-
ZoomService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: ZoomService, providedIn: 'root' });
|
|
452
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: ZoomService, decorators: [{
|
|
473
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ZoomService, decorators: [{
|
|
453
474
|
type: Injectable,
|
|
454
475
|
args: [{
|
|
455
476
|
providedIn: 'root',
|
|
@@ -472,11 +493,9 @@ function generateTicks(extremes, count = 10) {
|
|
|
472
493
|
}
|
|
473
494
|
|
|
474
495
|
class AxisSizeBuilder {
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
this.backupRatio = 0.58;
|
|
479
|
-
}
|
|
496
|
+
titlePadding = 11;
|
|
497
|
+
basePadding = 16;
|
|
498
|
+
backupRatio = 0.58;
|
|
480
499
|
build(settings) {
|
|
481
500
|
let finalPadding = this.basePadding;
|
|
482
501
|
if (settings.orientation === AxisOrientation.y) {
|
|
@@ -501,12 +520,10 @@ class AxisSizeBuilder {
|
|
|
501
520
|
}
|
|
502
521
|
|
|
503
522
|
class ExtremesBuilder {
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
this.extremes = [0, 0];
|
|
509
|
-
}
|
|
523
|
+
extentAccessorMap = new Map()
|
|
524
|
+
.set(AxisOrientation.x, (_) => _.x)
|
|
525
|
+
.set(AxisOrientation.y, (_) => _.y);
|
|
526
|
+
extremes = [0, 0];
|
|
510
527
|
build(settings) {
|
|
511
528
|
const options = settings.options;
|
|
512
529
|
const hasMin = options?.min != null;
|
|
@@ -533,25 +550,32 @@ class ExtremesBuilder {
|
|
|
533
550
|
}
|
|
534
551
|
|
|
535
552
|
class Axis {
|
|
553
|
+
chartConfig;
|
|
554
|
+
_orientation;
|
|
555
|
+
_index;
|
|
556
|
+
_extremes = [0, 0];
|
|
557
|
+
_selfSize;
|
|
558
|
+
_ticksValues;
|
|
559
|
+
_options;
|
|
560
|
+
_originDomain = [0, 0];
|
|
561
|
+
_scale;
|
|
562
|
+
defaultFormatters = new Map()
|
|
563
|
+
.set(ScaleType.linear, d3.format(',.5~r'))
|
|
564
|
+
.set(ScaleType.time, d3.timeFormat('%d.%m.%Y'))
|
|
565
|
+
.set(ScaleType.log, d3.format('~s'))
|
|
566
|
+
.set(ScaleType.symlog, d3.format('~s'))
|
|
567
|
+
.set(ScaleType.pow, d3.format('~s'))
|
|
568
|
+
.set(ScaleType.sqrt, d3.format('~s'))
|
|
569
|
+
.set(ScaleType.band, (_) => { return _; });
|
|
570
|
+
defaultScales = new Map()
|
|
571
|
+
.set(ScaleType.linear, d3.scaleLinear)
|
|
572
|
+
.set(ScaleType.log, d3.scaleLog)
|
|
573
|
+
.set(ScaleType.symlog, d3.scaleSymlog)
|
|
574
|
+
.set(ScaleType.pow, d3.scalePow)
|
|
575
|
+
.set(ScaleType.sqrt, d3.scaleSqrt)
|
|
576
|
+
.set(ScaleType.time, d3.scaleTime)
|
|
577
|
+
.set(ScaleType.band, d3.scaleBand);
|
|
536
578
|
constructor(config) {
|
|
537
|
-
this._extremes = [0, 0];
|
|
538
|
-
this._originDomain = [0, 0];
|
|
539
|
-
this.defaultFormatters = new Map()
|
|
540
|
-
.set(ScaleType.linear, d3.format(',.5~r'))
|
|
541
|
-
.set(ScaleType.time, d3.timeFormat('%d.%m.%Y'))
|
|
542
|
-
.set(ScaleType.log, d3.format('~s'))
|
|
543
|
-
.set(ScaleType.symlog, d3.format('~s'))
|
|
544
|
-
.set(ScaleType.pow, d3.format('~s'))
|
|
545
|
-
.set(ScaleType.sqrt, d3.format('~s'))
|
|
546
|
-
.set(ScaleType.band, (_) => { return _; });
|
|
547
|
-
this.defaultScales = new Map()
|
|
548
|
-
.set(ScaleType.linear, d3.scaleLinear)
|
|
549
|
-
.set(ScaleType.log, d3.scaleLog)
|
|
550
|
-
.set(ScaleType.symlog, d3.scaleSymlog)
|
|
551
|
-
.set(ScaleType.pow, d3.scalePow)
|
|
552
|
-
.set(ScaleType.sqrt, d3.scaleSqrt)
|
|
553
|
-
.set(ScaleType.time, d3.scaleTime)
|
|
554
|
-
.set(ScaleType.band, d3.scaleBand);
|
|
555
579
|
this.chartConfig = config;
|
|
556
580
|
}
|
|
557
581
|
/**
|
|
@@ -657,6 +681,12 @@ class Axis {
|
|
|
657
681
|
}
|
|
658
682
|
|
|
659
683
|
class ZoomMessage {
|
|
684
|
+
eventType;
|
|
685
|
+
element;
|
|
686
|
+
axis;
|
|
687
|
+
domain;
|
|
688
|
+
chartId;
|
|
689
|
+
style;
|
|
660
690
|
constructor(options) {
|
|
661
691
|
this.eventType = options?.eventType;
|
|
662
692
|
this.element = options?.element;
|
|
@@ -667,6 +697,9 @@ class ZoomMessage {
|
|
|
667
697
|
}
|
|
668
698
|
}
|
|
669
699
|
class BrushMessage {
|
|
700
|
+
chartId;
|
|
701
|
+
selection;
|
|
702
|
+
mode;
|
|
670
703
|
constructor(options) {
|
|
671
704
|
this.chartId = options?.chartId;
|
|
672
705
|
this.selection = options?.selection;
|
|
@@ -675,19 +708,22 @@ class BrushMessage {
|
|
|
675
708
|
}
|
|
676
709
|
|
|
677
710
|
class ScaleService {
|
|
711
|
+
chartService;
|
|
712
|
+
zoomService;
|
|
713
|
+
scales;
|
|
714
|
+
transformCacheX = new Map();
|
|
715
|
+
transformCacheY = new Map();
|
|
716
|
+
scaleMapping = new Map()
|
|
717
|
+
.set(ScaleType.linear, d3.scaleLinear)
|
|
718
|
+
.set(ScaleType.time, d3.scaleTime)
|
|
719
|
+
.set(ScaleType.log, d3.scaleLog)
|
|
720
|
+
.set(ScaleType.symlog, d3.scaleSymlog)
|
|
721
|
+
.set(ScaleType.pow, d3.scalePow)
|
|
722
|
+
.set(ScaleType.sqrt, d3.scaleSqrt)
|
|
723
|
+
.set(ScaleType.band, d3.scaleBand);
|
|
678
724
|
constructor(chartService, zoomService) {
|
|
679
725
|
this.chartService = chartService;
|
|
680
726
|
this.zoomService = zoomService;
|
|
681
|
-
this.transformCacheX = new Map();
|
|
682
|
-
this.transformCacheY = new Map();
|
|
683
|
-
this.scaleMapping = new Map()
|
|
684
|
-
.set(ScaleType.linear, d3.scaleLinear)
|
|
685
|
-
.set(ScaleType.time, d3.scaleTime)
|
|
686
|
-
.set(ScaleType.log, d3.scaleLog)
|
|
687
|
-
.set(ScaleType.symlog, d3.scaleSymlog)
|
|
688
|
-
.set(ScaleType.pow, d3.scalePow)
|
|
689
|
-
.set(ScaleType.sqrt, d3.scaleSqrt)
|
|
690
|
-
.set(ScaleType.band, d3.scaleBand);
|
|
691
727
|
this.scales = combineLatest([
|
|
692
728
|
this.chartService.size,
|
|
693
729
|
this.chartService.config,
|
|
@@ -856,10 +892,10 @@ class ScaleService {
|
|
|
856
892
|
});
|
|
857
893
|
});
|
|
858
894
|
}
|
|
895
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ScaleService, deps: [{ token: ChartService }, { token: ZoomService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
896
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ScaleService, providedIn: 'root' });
|
|
859
897
|
}
|
|
860
|
-
|
|
861
|
-
ScaleService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: ScaleService, providedIn: 'root' });
|
|
862
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: ScaleService, decorators: [{
|
|
898
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ScaleService, decorators: [{
|
|
863
899
|
type: Injectable,
|
|
864
900
|
args: [{
|
|
865
901
|
providedIn: 'root',
|
|
@@ -867,17 +903,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
867
903
|
}], ctorParameters: function () { return [{ type: ChartService }, { type: ZoomService }]; } });
|
|
868
904
|
|
|
869
905
|
class BrushService {
|
|
906
|
+
brushDomain;
|
|
907
|
+
_brushDomain = new ReplaySubject(1);
|
|
870
908
|
constructor() {
|
|
871
|
-
this._brushDomain = new ReplaySubject(1);
|
|
872
909
|
this.brushDomain = this._brushDomain.asObservable();
|
|
873
910
|
}
|
|
874
911
|
setBrush(brush) {
|
|
875
912
|
this._brushDomain.next(brush);
|
|
876
913
|
}
|
|
914
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: BrushService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
915
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: BrushService, providedIn: 'root' });
|
|
877
916
|
}
|
|
878
|
-
|
|
879
|
-
BrushService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: BrushService, providedIn: 'root' });
|
|
880
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: BrushService, decorators: [{
|
|
917
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: BrushService, decorators: [{
|
|
881
918
|
type: Injectable,
|
|
882
919
|
args: [{
|
|
883
920
|
providedIn: 'root',
|
|
@@ -892,14 +929,12 @@ var BrushType;
|
|
|
892
929
|
})(BrushType || (BrushType = {}));
|
|
893
930
|
|
|
894
931
|
class SeriesBaseComponent {
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
this.zone = zone;
|
|
902
|
-
}
|
|
932
|
+
svc;
|
|
933
|
+
cdr;
|
|
934
|
+
scaleService;
|
|
935
|
+
zoomService;
|
|
936
|
+
element;
|
|
937
|
+
zone;
|
|
903
938
|
set config(config) {
|
|
904
939
|
this._config = config;
|
|
905
940
|
}
|
|
@@ -912,12 +947,22 @@ class SeriesBaseComponent {
|
|
|
912
947
|
get series() {
|
|
913
948
|
return this._series;
|
|
914
949
|
}
|
|
950
|
+
_series;
|
|
951
|
+
_config;
|
|
952
|
+
constructor(svc, cdr, scaleService, zoomService, element, zone) {
|
|
953
|
+
this.svc = svc;
|
|
954
|
+
this.cdr = cdr;
|
|
955
|
+
this.scaleService = scaleService;
|
|
956
|
+
this.zoomService = zoomService;
|
|
957
|
+
this.element = element;
|
|
958
|
+
this.zone = zone;
|
|
959
|
+
}
|
|
915
960
|
ngOnInit() {
|
|
916
961
|
}
|
|
962
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: SeriesBaseComponent, deps: [{ token: ChartService }, { token: i0.ChangeDetectorRef }, { token: ScaleService }, { token: ZoomService }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
963
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: SeriesBaseComponent, selector: "ng-component", inputs: { config: "config", series: "series" }, ngImport: i0, template: '', isInline: true });
|
|
917
964
|
}
|
|
918
|
-
|
|
919
|
-
SeriesBaseComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: SeriesBaseComponent, selector: "ng-component", inputs: { config: "config", series: "series" }, ngImport: i0, template: '', isInline: true });
|
|
920
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: SeriesBaseComponent, decorators: [{
|
|
965
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: SeriesBaseComponent, decorators: [{
|
|
921
966
|
type: Component,
|
|
922
967
|
args: [{
|
|
923
968
|
template: '',
|
|
@@ -929,6 +974,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
929
974
|
}] } });
|
|
930
975
|
|
|
931
976
|
class LinearSeriesBase extends SeriesBaseComponent {
|
|
977
|
+
svc;
|
|
978
|
+
cdr;
|
|
979
|
+
scaleService;
|
|
980
|
+
zoomService;
|
|
981
|
+
element;
|
|
982
|
+
defaultClipPointsMapping = new Map();
|
|
983
|
+
transform;
|
|
984
|
+
display;
|
|
985
|
+
path;
|
|
986
|
+
x;
|
|
987
|
+
y;
|
|
988
|
+
markers;
|
|
989
|
+
__series;
|
|
990
|
+
_update = new BehaviorSubject(null);
|
|
991
|
+
set series(series) {
|
|
992
|
+
this.__series = series;
|
|
993
|
+
this.markers = this.__series.data?.filter((_) => _?.marker && _?.x !== undefined && _?.y !== undefined && _?.x !== null && _?.y !== null);
|
|
994
|
+
}
|
|
995
|
+
get series() {
|
|
996
|
+
return this.__series;
|
|
997
|
+
}
|
|
932
998
|
constructor(svc, cdr, scaleService, zoomService, element) {
|
|
933
999
|
super(svc, cdr, scaleService, zoomService, element);
|
|
934
1000
|
this.svc = svc;
|
|
@@ -936,15 +1002,6 @@ class LinearSeriesBase extends SeriesBaseComponent {
|
|
|
936
1002
|
this.scaleService = scaleService;
|
|
937
1003
|
this.zoomService = zoomService;
|
|
938
1004
|
this.element = element;
|
|
939
|
-
this.defaultClipPointsMapping = new Map();
|
|
940
|
-
this._update = new BehaviorSubject(null);
|
|
941
|
-
}
|
|
942
|
-
set series(series) {
|
|
943
|
-
this.__series = series;
|
|
944
|
-
this.markers = this.__series.data?.filter((_) => _?.marker && _?.x !== undefined && _?.y !== undefined && _?.x !== null && _?.y !== null);
|
|
945
|
-
}
|
|
946
|
-
get series() {
|
|
947
|
-
return this.__series;
|
|
948
1005
|
}
|
|
949
1006
|
ngOnInit() {
|
|
950
1007
|
const filterX = (min, max) => (point, idx, arr) => {
|
|
@@ -1104,10 +1161,10 @@ class LinearSeriesBase extends SeriesBaseComponent {
|
|
|
1104
1161
|
};
|
|
1105
1162
|
}
|
|
1106
1163
|
}
|
|
1164
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: LinearSeriesBase, deps: [{ token: ChartService }, { token: i0.ChangeDetectorRef }, { token: ScaleService }, { token: ZoomService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1165
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: LinearSeriesBase, selector: "ng-component", inputs: { series: "series" }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
|
|
1107
1166
|
}
|
|
1108
|
-
|
|
1109
|
-
LinearSeriesBase.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: LinearSeriesBase, selector: "ng-component", inputs: { series: "series" }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
|
|
1110
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: LinearSeriesBase, decorators: [{
|
|
1167
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: LinearSeriesBase, decorators: [{
|
|
1111
1168
|
type: Component,
|
|
1112
1169
|
args: [{
|
|
1113
1170
|
template: '',
|
|
@@ -1124,12 +1181,18 @@ var DragPointType;
|
|
|
1124
1181
|
})(DragPointType || (DragPointType = {}));
|
|
1125
1182
|
|
|
1126
1183
|
class DraggablePointDirective {
|
|
1184
|
+
_elementRef;
|
|
1185
|
+
tetaDraggablePoint;
|
|
1186
|
+
dragDirection;
|
|
1187
|
+
allowDrag;
|
|
1188
|
+
startPosition;
|
|
1189
|
+
transformCache;
|
|
1127
1190
|
constructor(_elementRef) {
|
|
1128
1191
|
this._elementRef = _elementRef;
|
|
1129
|
-
this.moveStart = new EventEmitter();
|
|
1130
|
-
this.moveProcess = new EventEmitter();
|
|
1131
|
-
this.moveEnd = new EventEmitter();
|
|
1132
1192
|
}
|
|
1193
|
+
moveStart = new EventEmitter();
|
|
1194
|
+
moveProcess = new EventEmitter();
|
|
1195
|
+
moveEnd = new EventEmitter();
|
|
1133
1196
|
mouseDown(event) {
|
|
1134
1197
|
if (!this.tetaDraggablePoint) {
|
|
1135
1198
|
return;
|
|
@@ -1220,10 +1283,10 @@ class DraggablePointDirective {
|
|
|
1220
1283
|
this.setTransform(0, 0);
|
|
1221
1284
|
this.transformCache = null;
|
|
1222
1285
|
}
|
|
1286
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DraggablePointDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1287
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.4", type: DraggablePointDirective, selector: "[tetaDraggablePoint]", inputs: { tetaDraggablePoint: "tetaDraggablePoint", dragDirection: "dragDirection", allowDrag: "allowDrag" }, outputs: { moveStart: "moveStart", moveProcess: "moveProcess", moveEnd: "moveEnd" }, host: { listeners: { "mousedown": "mouseDown($event)", "touchstart": "mouseDown($event)", "window:mouseup": "mouseUp($event)", "window:touchend": "mouseUp($event)", "window:mousemove": "mouseMove($event)", "window:touchmove": "mouseMove($event)" } }, exportAs: ["tetaDraggablePoint"], ngImport: i0 });
|
|
1223
1288
|
}
|
|
1224
|
-
|
|
1225
|
-
DraggablePointDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.2", type: DraggablePointDirective, selector: "[tetaDraggablePoint]", inputs: { tetaDraggablePoint: "tetaDraggablePoint", dragDirection: "dragDirection", allowDrag: "allowDrag" }, outputs: { moveStart: "moveStart", moveProcess: "moveProcess", moveEnd: "moveEnd" }, host: { listeners: { "mousedown": "mouseDown($event)", "touchstart": "mouseDown($event)", "window:mouseup": "mouseUp($event)", "window:touchend": "mouseUp($event)", "window:mousemove": "mouseMove($event)", "window:touchmove": "mouseMove($event)" } }, exportAs: ["tetaDraggablePoint"], ngImport: i0 });
|
|
1226
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: DraggablePointDirective, decorators: [{
|
|
1289
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DraggablePointDirective, decorators: [{
|
|
1227
1290
|
type: Directive,
|
|
1228
1291
|
args: [{
|
|
1229
1292
|
selector: '[tetaDraggablePoint]',
|
|
@@ -1262,6 +1325,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
1262
1325
|
}] } });
|
|
1263
1326
|
|
|
1264
1327
|
class LineSeriesComponent extends LinearSeriesBase {
|
|
1328
|
+
svc;
|
|
1329
|
+
cdr;
|
|
1330
|
+
scaleService;
|
|
1331
|
+
zoomService;
|
|
1332
|
+
element;
|
|
1265
1333
|
constructor(svc, cdr, scaleService, zoomService, element) {
|
|
1266
1334
|
super(svc, cdr, scaleService, zoomService, element);
|
|
1267
1335
|
this.svc = svc;
|
|
@@ -1269,32 +1337,9 @@ class LineSeriesComponent extends LinearSeriesBase {
|
|
|
1269
1337
|
this.scaleService = scaleService;
|
|
1270
1338
|
this.zoomService = zoomService;
|
|
1271
1339
|
this.element = element;
|
|
1272
|
-
this.allowDrag = (point) => {
|
|
1273
|
-
return (newPoint) => {
|
|
1274
|
-
if (point.marker.minX !== null && point.marker.minX !== undefined) {
|
|
1275
|
-
if (this.x.invert(this.x(this.start.x) + newPoint.deltaX) < point.marker.minX) {
|
|
1276
|
-
return false;
|
|
1277
|
-
}
|
|
1278
|
-
}
|
|
1279
|
-
if (point.marker.maxX !== null && point.marker.maxX !== undefined) {
|
|
1280
|
-
if (this.x.invert(this.x(this.start.x) + newPoint.deltaX) > point.marker.maxX) {
|
|
1281
|
-
return false;
|
|
1282
|
-
}
|
|
1283
|
-
}
|
|
1284
|
-
if (point.marker.minY !== null && point.marker.minY !== undefined) {
|
|
1285
|
-
if (this.y.invert(this.y(this.start.y) + newPoint.deltaY) < point.marker.minY) {
|
|
1286
|
-
return false;
|
|
1287
|
-
}
|
|
1288
|
-
}
|
|
1289
|
-
if (point.marker.maxY !== null && point.marker.maxY !== undefined) {
|
|
1290
|
-
if (this.y.invert(this.y(this.start.y) + newPoint.deltaY) > point.marker.maxY) {
|
|
1291
|
-
return false;
|
|
1292
|
-
}
|
|
1293
|
-
}
|
|
1294
|
-
return true;
|
|
1295
|
-
};
|
|
1296
|
-
};
|
|
1297
1340
|
}
|
|
1341
|
+
start;
|
|
1342
|
+
labelStart;
|
|
1298
1343
|
moveStart(event, point) {
|
|
1299
1344
|
this.start = { x: point.x, y: point.y };
|
|
1300
1345
|
}
|
|
@@ -1337,15 +1382,50 @@ class LineSeriesComponent extends LinearSeriesBase {
|
|
|
1337
1382
|
label.dx = this.labelStart.dx + event.deltaX;
|
|
1338
1383
|
label.dy = this.labelStart.dy + event.deltaY;
|
|
1339
1384
|
}
|
|
1385
|
+
allowDrag = (point) => {
|
|
1386
|
+
return (newPoint) => {
|
|
1387
|
+
if (point.marker.minX !== null && point.marker.minX !== undefined) {
|
|
1388
|
+
if (this.x.invert(this.x(this.start.x) + newPoint.deltaX) < point.marker.minX) {
|
|
1389
|
+
return false;
|
|
1390
|
+
}
|
|
1391
|
+
}
|
|
1392
|
+
if (point.marker.maxX !== null && point.marker.maxX !== undefined) {
|
|
1393
|
+
if (this.x.invert(this.x(this.start.x) + newPoint.deltaX) > point.marker.maxX) {
|
|
1394
|
+
return false;
|
|
1395
|
+
}
|
|
1396
|
+
}
|
|
1397
|
+
if (point.marker.minY !== null && point.marker.minY !== undefined) {
|
|
1398
|
+
if (this.y.invert(this.y(this.start.y) + newPoint.deltaY) < point.marker.minY) {
|
|
1399
|
+
return false;
|
|
1400
|
+
}
|
|
1401
|
+
}
|
|
1402
|
+
if (point.marker.maxY !== null && point.marker.maxY !== undefined) {
|
|
1403
|
+
if (this.y.invert(this.y(this.start.y) + newPoint.deltaY) > point.marker.maxY) {
|
|
1404
|
+
return false;
|
|
1405
|
+
}
|
|
1406
|
+
}
|
|
1407
|
+
return true;
|
|
1408
|
+
};
|
|
1409
|
+
};
|
|
1410
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: LineSeriesComponent, deps: [{ token: ChartService }, { token: i0.ChangeDetectorRef }, { token: ScaleService }, { token: ZoomService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1411
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: LineSeriesComponent, selector: "svg:svg[teta-line-series]", usesInheritance: true, ngImport: i0, template: "<svg:path\n class=\"line\"\n [attr.d]=\"path | async\"\n [attr.stroke]=\"series.color\"\n [attr.stroke-dasharray]=\"series.style?.strokeDasharray\"\n [attr.stroke-width]=\"series.style?.strokeWidth\"\n fill=\"none\">\n</svg:path>\n<ng-container *ngIf=\"transform | async as t\">\n <svg:circle\n *ngIf=\"t?.x !=null && t?.y!=null\"\n r=\"3\"\n [attr.fill]=\"series.color\"\n [attr.transform]=\"'translate('+ t.x +', '+ t.y +')'\"\n >\n </svg:circle>\n</ng-container>\n<ng-container *ngIf=\"markers as draggablePoints\">\n <ng-container *ngIf=\"x && y\">\n <svg:g\n *ngFor=\"let point of draggablePoints\"\n [attr.transform]=\"'translate(' + x(point.x) + ',' + y(point.y) + ')'\">\n <svg:g [tetaDraggablePoint]=\"point.marker.draggable\"\n [dragDirection]=\"point.marker.dragType\"\n [allowDrag]=\"allowDrag(point)\"\n #dragPoint=\"tetaDraggablePoint\"\n (moveStart)=\"moveStart($event, point)\"\n (moveEnd)=\"moveEnd($event, point);dragPoint.resetTransform();\"\n (moveProcess)=\"moveProcess($event, point);dragPoint.resetTransform();\"\n [class.draggable-marker]=\"point?.marker?.draggable\">\n <svg:circle\n class=\"marker\"\n [attr.r]=\"point.marker.style?.radius ?? 5\"\n [attr.fill]=\"point.marker.style?.fill ?? 'transparent'\"\n [attr.stroke]=\"point.marker.style?.stroke ?? 'none'\"\n [attr.stroke-width]=\"point.marker.style?.strokeWidth\"\n [attr.stroke-dasharray]=\"point.marker.style?.strokeDasharray\"\n [attr.cx]=\"0\"\n [attr.cy]=\"0\">\n </svg:circle>\n <ng-container *ngIf=\"point.marker.label?.text\">\n <svg:line\n [attr.x1]=\"0\"\n [attr.y1]=\"0\"\n [attr.x2]=\"point.marker.label?.dx\"\n [attr.y2]=\"point.marker.label?.dy\"\n [attr.stroke]=\"point.marker.label?.style?.stroke ?? 'var(--color-text-90)'\"\n [attr.stroke-width]=\"point.marker.label?.style?.strokeWidth ?? 1\"\n [attr.stroke-dasharray]=\"point.marker.label?.style?.strokeDasharray ?? null\">\n </svg:line>\n <svg:foreignObject\n [tetaDraggablePoint]=\"point.marker.label?.draggable\"\n [dragDirection]=\"point.marker.label.dragType\"\n #labelPoint=\"tetaDraggablePoint\"\n (moveStart)=\"startLabel($event, point.marker.label)\"\n (moveProcess)=\"moveLabel($event, point.marker.label); labelPoint.resetTransform();\"\n (moveEnd)=\"labelPoint.resetTransform();\"\n [attr.width]=\"annotationNode?.offsetWidth ?? 0\"\n [attr.height]=\"annotationNode?.offsetHeight ?? 0\"\n [attr.x]=\"point.marker.label?.dx\"\n [attr.y]=\"point.marker.label?.dy\"\n class=\"position-absolute\">\n <div\n #annotationNode\n class=\"shadow-2 padding-2\"\n [style.color]=\"'var(--color-text-90)'\"\n [style.background-color]=\"'var(--color-global-bgcard)'\"\n [style.cursor]=\"'move'\"\n style=\"border-radius: 2px; display: inline-block;\">\n {{point.marker.label?.text}}\n </div>\n </svg:foreignObject>\n </ng-container>\n </svg:g>\n </svg:g>\n </ng-container>\n\n</ng-container>\n\n\n\n", styles: [".draggable-marker{cursor:move}.active{stroke-opacity:.5}.marker-grab{opacity:0}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: DraggablePointDirective, selector: "[tetaDraggablePoint]", inputs: ["tetaDraggablePoint", "dragDirection", "allowDrag"], outputs: ["moveStart", "moveProcess", "moveEnd"], exportAs: ["tetaDraggablePoint"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1340
1412
|
}
|
|
1341
|
-
|
|
1342
|
-
LineSeriesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: LineSeriesComponent, selector: "svg:svg[teta-line-series]", usesInheritance: true, ngImport: i0, template: "<svg:path\n class=\"line\"\n [attr.d]=\"path | async\"\n [attr.stroke]=\"series.color\"\n [attr.stroke-dasharray]=\"series.style?.strokeDasharray\"\n [attr.stroke-width]=\"series.style?.strokeWidth\"\n fill=\"none\">\n</svg:path>\n<ng-container *ngIf=\"transform | async as t\">\n <svg:circle\n *ngIf=\"t?.x !=null && t?.y!=null\"\n r=\"3\"\n [attr.fill]=\"series.color\"\n [attr.transform]=\"'translate('+ t.x +', '+ t.y +')'\"\n >\n </svg:circle>\n</ng-container>\n<ng-container *ngIf=\"markers as draggablePoints\">\n <ng-container *ngIf=\"x && y\">\n <svg:g\n *ngFor=\"let point of draggablePoints\"\n [attr.transform]=\"'translate(' + x(point.x) + ',' + y(point.y) + ')'\">\n <svg:g [tetaDraggablePoint]=\"point.marker.draggable\"\n [dragDirection]=\"point.marker.dragType\"\n [allowDrag]=\"allowDrag(point)\"\n #dragPoint=\"tetaDraggablePoint\"\n (moveStart)=\"moveStart($event, point)\"\n (moveEnd)=\"moveEnd($event, point);dragPoint.resetTransform();\"\n (moveProcess)=\"moveProcess($event, point);dragPoint.resetTransform();\"\n [class.draggable-marker]=\"point?.marker?.draggable\">\n <svg:circle\n class=\"marker\"\n [attr.r]=\"point.marker.style?.radius ?? 5\"\n [attr.fill]=\"point.marker.style?.fill ?? 'transparent'\"\n [attr.stroke]=\"point.marker.style?.stroke ?? 'none'\"\n [attr.stroke-width]=\"point.marker.style?.strokeWidth\"\n [attr.stroke-dasharray]=\"point.marker.style?.strokeDasharray\"\n [attr.cx]=\"0\"\n [attr.cy]=\"0\">\n </svg:circle>\n <ng-container *ngIf=\"point.marker.label?.text\">\n <svg:line\n [attr.x1]=\"0\"\n [attr.y1]=\"0\"\n [attr.x2]=\"point.marker.label?.dx\"\n [attr.y2]=\"point.marker.label?.dy\"\n [attr.stroke]=\"point.marker.label?.style?.stroke ?? 'var(--color-text-90)'\"\n [attr.stroke-width]=\"point.marker.label?.style?.strokeWidth ?? 1\"\n [attr.stroke-dasharray]=\"point.marker.label?.style?.strokeDasharray ?? null\">\n </svg:line>\n <svg:foreignObject\n [tetaDraggablePoint]=\"point.marker.label?.draggable\"\n [dragDirection]=\"point.marker.label.dragType\"\n #labelPoint=\"tetaDraggablePoint\"\n (moveStart)=\"startLabel($event, point.marker.label)\"\n (moveProcess)=\"moveLabel($event, point.marker.label); labelPoint.resetTransform();\"\n (moveEnd)=\"labelPoint.resetTransform();\"\n [attr.width]=\"annotationNode?.offsetWidth ?? 0\"\n [attr.height]=\"annotationNode?.offsetHeight ?? 0\"\n [attr.x]=\"point.marker.label?.dx\"\n [attr.y]=\"point.marker.label?.dy\"\n class=\"position-absolute\">\n <div\n #annotationNode\n class=\"shadow-2 padding-2\"\n [style.color]=\"'var(--color-text-90)'\"\n [style.background-color]=\"'var(--color-background-50)'\"\n [style.cursor]=\"'move'\"\n style=\"border-radius: 2px; display: inline-block;\">\n {{point.marker.label?.text}}\n </div>\n </svg:foreignObject>\n </ng-container>\n </svg:g>\n </svg:g>\n </ng-container>\n\n</ng-container>\n\n\n\n", styles: [".draggable-marker{cursor:move}.active{stroke-opacity:.5}.marker-grab{opacity:0}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: DraggablePointDirective, selector: "[tetaDraggablePoint]", inputs: ["tetaDraggablePoint", "dragDirection", "allowDrag"], outputs: ["moveStart", "moveProcess", "moveEnd"], exportAs: ["tetaDraggablePoint"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1343
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: LineSeriesComponent, decorators: [{
|
|
1413
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: LineSeriesComponent, decorators: [{
|
|
1344
1414
|
type: Component,
|
|
1345
|
-
args: [{ selector: 'svg:svg[teta-line-series]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<svg:path\n class=\"line\"\n [attr.d]=\"path | async\"\n [attr.stroke]=\"series.color\"\n [attr.stroke-dasharray]=\"series.style?.strokeDasharray\"\n [attr.stroke-width]=\"series.style?.strokeWidth\"\n fill=\"none\">\n</svg:path>\n<ng-container *ngIf=\"transform | async as t\">\n <svg:circle\n *ngIf=\"t?.x !=null && t?.y!=null\"\n r=\"3\"\n [attr.fill]=\"series.color\"\n [attr.transform]=\"'translate('+ t.x +', '+ t.y +')'\"\n >\n </svg:circle>\n</ng-container>\n<ng-container *ngIf=\"markers as draggablePoints\">\n <ng-container *ngIf=\"x && y\">\n <svg:g\n *ngFor=\"let point of draggablePoints\"\n [attr.transform]=\"'translate(' + x(point.x) + ',' + y(point.y) + ')'\">\n <svg:g [tetaDraggablePoint]=\"point.marker.draggable\"\n [dragDirection]=\"point.marker.dragType\"\n [allowDrag]=\"allowDrag(point)\"\n #dragPoint=\"tetaDraggablePoint\"\n (moveStart)=\"moveStart($event, point)\"\n (moveEnd)=\"moveEnd($event, point);dragPoint.resetTransform();\"\n (moveProcess)=\"moveProcess($event, point);dragPoint.resetTransform();\"\n [class.draggable-marker]=\"point?.marker?.draggable\">\n <svg:circle\n class=\"marker\"\n [attr.r]=\"point.marker.style?.radius ?? 5\"\n [attr.fill]=\"point.marker.style?.fill ?? 'transparent'\"\n [attr.stroke]=\"point.marker.style?.stroke ?? 'none'\"\n [attr.stroke-width]=\"point.marker.style?.strokeWidth\"\n [attr.stroke-dasharray]=\"point.marker.style?.strokeDasharray\"\n [attr.cx]=\"0\"\n [attr.cy]=\"0\">\n </svg:circle>\n <ng-container *ngIf=\"point.marker.label?.text\">\n <svg:line\n [attr.x1]=\"0\"\n [attr.y1]=\"0\"\n [attr.x2]=\"point.marker.label?.dx\"\n [attr.y2]=\"point.marker.label?.dy\"\n [attr.stroke]=\"point.marker.label?.style?.stroke ?? 'var(--color-text-90)'\"\n [attr.stroke-width]=\"point.marker.label?.style?.strokeWidth ?? 1\"\n [attr.stroke-dasharray]=\"point.marker.label?.style?.strokeDasharray ?? null\">\n </svg:line>\n <svg:foreignObject\n [tetaDraggablePoint]=\"point.marker.label?.draggable\"\n [dragDirection]=\"point.marker.label.dragType\"\n #labelPoint=\"tetaDraggablePoint\"\n (moveStart)=\"startLabel($event, point.marker.label)\"\n (moveProcess)=\"moveLabel($event, point.marker.label); labelPoint.resetTransform();\"\n (moveEnd)=\"labelPoint.resetTransform();\"\n [attr.width]=\"annotationNode?.offsetWidth ?? 0\"\n [attr.height]=\"annotationNode?.offsetHeight ?? 0\"\n [attr.x]=\"point.marker.label?.dx\"\n [attr.y]=\"point.marker.label?.dy\"\n class=\"position-absolute\">\n <div\n #annotationNode\n class=\"shadow-2 padding-2\"\n [style.color]=\"'var(--color-text-90)'\"\n [style.background-color]=\"'var(--color-
|
|
1415
|
+
args: [{ selector: 'svg:svg[teta-line-series]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<svg:path\n class=\"line\"\n [attr.d]=\"path | async\"\n [attr.stroke]=\"series.color\"\n [attr.stroke-dasharray]=\"series.style?.strokeDasharray\"\n [attr.stroke-width]=\"series.style?.strokeWidth\"\n fill=\"none\">\n</svg:path>\n<ng-container *ngIf=\"transform | async as t\">\n <svg:circle\n *ngIf=\"t?.x !=null && t?.y!=null\"\n r=\"3\"\n [attr.fill]=\"series.color\"\n [attr.transform]=\"'translate('+ t.x +', '+ t.y +')'\"\n >\n </svg:circle>\n</ng-container>\n<ng-container *ngIf=\"markers as draggablePoints\">\n <ng-container *ngIf=\"x && y\">\n <svg:g\n *ngFor=\"let point of draggablePoints\"\n [attr.transform]=\"'translate(' + x(point.x) + ',' + y(point.y) + ')'\">\n <svg:g [tetaDraggablePoint]=\"point.marker.draggable\"\n [dragDirection]=\"point.marker.dragType\"\n [allowDrag]=\"allowDrag(point)\"\n #dragPoint=\"tetaDraggablePoint\"\n (moveStart)=\"moveStart($event, point)\"\n (moveEnd)=\"moveEnd($event, point);dragPoint.resetTransform();\"\n (moveProcess)=\"moveProcess($event, point);dragPoint.resetTransform();\"\n [class.draggable-marker]=\"point?.marker?.draggable\">\n <svg:circle\n class=\"marker\"\n [attr.r]=\"point.marker.style?.radius ?? 5\"\n [attr.fill]=\"point.marker.style?.fill ?? 'transparent'\"\n [attr.stroke]=\"point.marker.style?.stroke ?? 'none'\"\n [attr.stroke-width]=\"point.marker.style?.strokeWidth\"\n [attr.stroke-dasharray]=\"point.marker.style?.strokeDasharray\"\n [attr.cx]=\"0\"\n [attr.cy]=\"0\">\n </svg:circle>\n <ng-container *ngIf=\"point.marker.label?.text\">\n <svg:line\n [attr.x1]=\"0\"\n [attr.y1]=\"0\"\n [attr.x2]=\"point.marker.label?.dx\"\n [attr.y2]=\"point.marker.label?.dy\"\n [attr.stroke]=\"point.marker.label?.style?.stroke ?? 'var(--color-text-90)'\"\n [attr.stroke-width]=\"point.marker.label?.style?.strokeWidth ?? 1\"\n [attr.stroke-dasharray]=\"point.marker.label?.style?.strokeDasharray ?? null\">\n </svg:line>\n <svg:foreignObject\n [tetaDraggablePoint]=\"point.marker.label?.draggable\"\n [dragDirection]=\"point.marker.label.dragType\"\n #labelPoint=\"tetaDraggablePoint\"\n (moveStart)=\"startLabel($event, point.marker.label)\"\n (moveProcess)=\"moveLabel($event, point.marker.label); labelPoint.resetTransform();\"\n (moveEnd)=\"labelPoint.resetTransform();\"\n [attr.width]=\"annotationNode?.offsetWidth ?? 0\"\n [attr.height]=\"annotationNode?.offsetHeight ?? 0\"\n [attr.x]=\"point.marker.label?.dx\"\n [attr.y]=\"point.marker.label?.dy\"\n class=\"position-absolute\">\n <div\n #annotationNode\n class=\"shadow-2 padding-2\"\n [style.color]=\"'var(--color-text-90)'\"\n [style.background-color]=\"'var(--color-global-bgcard)'\"\n [style.cursor]=\"'move'\"\n style=\"border-radius: 2px; display: inline-block;\">\n {{point.marker.label?.text}}\n </div>\n </svg:foreignObject>\n </ng-container>\n </svg:g>\n </svg:g>\n </ng-container>\n\n</ng-container>\n\n\n\n", styles: [".draggable-marker{cursor:move}.active{stroke-opacity:.5}.marker-grab{opacity:0}\n"] }]
|
|
1346
1416
|
}], ctorParameters: function () { return [{ type: ChartService }, { type: i0.ChangeDetectorRef }, { type: ScaleService }, { type: ZoomService }, { type: i0.ElementRef }]; } });
|
|
1347
1417
|
|
|
1348
1418
|
class BarSeriesComponent extends SeriesBaseComponent {
|
|
1419
|
+
svc;
|
|
1420
|
+
cdr;
|
|
1421
|
+
scaleService;
|
|
1422
|
+
zoomService;
|
|
1423
|
+
element;
|
|
1424
|
+
x;
|
|
1425
|
+
x1;
|
|
1426
|
+
y;
|
|
1427
|
+
barSeriesCount;
|
|
1428
|
+
Math = Math;
|
|
1349
1429
|
constructor(svc, cdr, scaleService, zoomService, element) {
|
|
1350
1430
|
super(svc, cdr, scaleService, zoomService, element);
|
|
1351
1431
|
this.svc = svc;
|
|
@@ -1353,7 +1433,6 @@ class BarSeriesComponent extends SeriesBaseComponent {
|
|
|
1353
1433
|
this.scaleService = scaleService;
|
|
1354
1434
|
this.zoomService = zoomService;
|
|
1355
1435
|
this.element = element;
|
|
1356
|
-
this.Math = Math;
|
|
1357
1436
|
}
|
|
1358
1437
|
ngOnInit() {
|
|
1359
1438
|
this.barSeriesCount = this.svc.config.pipe(map((_) => {
|
|
@@ -1386,15 +1465,25 @@ class BarSeriesComponent extends SeriesBaseComponent {
|
|
|
1386
1465
|
});
|
|
1387
1466
|
}
|
|
1388
1467
|
ngOnChanges(changes) { }
|
|
1468
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: BarSeriesComponent, deps: [{ token: ChartService }, { token: i0.ChangeDetectorRef }, { token: ScaleService }, { token: ZoomService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1469
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: BarSeriesComponent, selector: "svg:svg[teta-bar-series]", usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"{\n x: x | async,\n x1: x1 | async,\n y: y | async,\n barSeriesCount: barSeriesCount | async\n} as data\">\n <ng-container *ngIf=\"data.x && data.y\">\n <ng-container *ngIf=\"data.barSeriesCount > 1\">\n <svg:rect\n *ngFor=\"let point of series.data\"\n (mouseenter)=\"mouseenter(point)\"\n (mouseleave)=\"mouseleave(point)\"\n [attr.x]=\"data.x(point.x) + (series.id * data.x1.bandwidth() / data.barSeriesCount)\"\n [attr.y]=\"point.y > 0 ? data.y(point.y) : data.y(0)\"\n [attr.width]=\"data.x1.bandwidth() / data.barSeriesCount\"\n [attr.height]=\"Math.abs(data.y(point.y) - data.y(0))\"\n [attr.fill]=\"series.color\"\n ></svg:rect>\n </ng-container>\n <ng-container *ngIf=\"data.barSeriesCount === 1\">\n <svg:rect\n *ngFor=\"let point of series.data\"\n (mouseenter)=\"mouseenter(point)\"\n (mouseleave)=\"mouseleave(point)\"\n [attr.x]=\"data.x(point.x)\"\n [attr.y]=\"point.y > 0 ? data.y(point.y) : data.y(0)\"\n [attr.width]=\"data.x1.bandwidth()\"\n [attr.height]=\"Math.abs(data.y(point.y) - data.y(0))\"\n [attr.fill]=\"point.color ?? series.color\"\n ></svg:rect>\n </ng-container>\n </ng-container>\n</ng-container>\n\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1389
1470
|
}
|
|
1390
|
-
|
|
1391
|
-
BarSeriesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: BarSeriesComponent, selector: "svg:svg[teta-bar-series]", usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"{\n x: x | async,\n x1: x1 | async,\n y: y | async,\n barSeriesCount: barSeriesCount | async\n} as data\">\n <ng-container *ngIf=\"data.x && data.y\">\n <ng-container *ngIf=\"data.barSeriesCount > 1\">\n <svg:rect\n *ngFor=\"let point of series.data\"\n (mouseenter)=\"mouseenter(point)\"\n (mouseleave)=\"mouseleave(point)\"\n [attr.x]=\"data.x(point.x) + (series.id * data.x1.bandwidth() / data.barSeriesCount)\"\n [attr.y]=\"point.y > 0 ? data.y(point.y) : data.y(0)\"\n [attr.width]=\"data.x1.bandwidth() / data.barSeriesCount\"\n [attr.height]=\"Math.abs(data.y(point.y) - data.y(0))\"\n [attr.fill]=\"series.color\"\n ></svg:rect>\n </ng-container>\n <ng-container *ngIf=\"data.barSeriesCount === 1\">\n <svg:rect\n *ngFor=\"let point of series.data\"\n (mouseenter)=\"mouseenter(point)\"\n (mouseleave)=\"mouseleave(point)\"\n [attr.x]=\"data.x(point.x)\"\n [attr.y]=\"point.y > 0 ? data.y(point.y) : data.y(0)\"\n [attr.width]=\"data.x1.bandwidth()\"\n [attr.height]=\"Math.abs(data.y(point.y) - data.y(0))\"\n [attr.fill]=\"point.color ?? series.color\"\n ></svg:rect>\n </ng-container>\n </ng-container>\n</ng-container>\n\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1392
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: BarSeriesComponent, decorators: [{
|
|
1471
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: BarSeriesComponent, decorators: [{
|
|
1393
1472
|
type: Component,
|
|
1394
1473
|
args: [{ selector: 'svg:svg[teta-bar-series]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"{\n x: x | async,\n x1: x1 | async,\n y: y | async,\n barSeriesCount: barSeriesCount | async\n} as data\">\n <ng-container *ngIf=\"data.x && data.y\">\n <ng-container *ngIf=\"data.barSeriesCount > 1\">\n <svg:rect\n *ngFor=\"let point of series.data\"\n (mouseenter)=\"mouseenter(point)\"\n (mouseleave)=\"mouseleave(point)\"\n [attr.x]=\"data.x(point.x) + (series.id * data.x1.bandwidth() / data.barSeriesCount)\"\n [attr.y]=\"point.y > 0 ? data.y(point.y) : data.y(0)\"\n [attr.width]=\"data.x1.bandwidth() / data.barSeriesCount\"\n [attr.height]=\"Math.abs(data.y(point.y) - data.y(0))\"\n [attr.fill]=\"series.color\"\n ></svg:rect>\n </ng-container>\n <ng-container *ngIf=\"data.barSeriesCount === 1\">\n <svg:rect\n *ngFor=\"let point of series.data\"\n (mouseenter)=\"mouseenter(point)\"\n (mouseleave)=\"mouseleave(point)\"\n [attr.x]=\"data.x(point.x)\"\n [attr.y]=\"point.y > 0 ? data.y(point.y) : data.y(0)\"\n [attr.width]=\"data.x1.bandwidth()\"\n [attr.height]=\"Math.abs(data.y(point.y) - data.y(0))\"\n [attr.fill]=\"point.color ?? series.color\"\n ></svg:rect>\n </ng-container>\n </ng-container>\n</ng-container>\n\n" }]
|
|
1395
1474
|
}], ctorParameters: function () { return [{ type: ChartService }, { type: i0.ChangeDetectorRef }, { type: ScaleService }, { type: ZoomService }, { type: i0.ElementRef }]; } });
|
|
1396
1475
|
|
|
1397
1476
|
class ScatterSeriesComponent extends SeriesBaseComponent {
|
|
1477
|
+
svc;
|
|
1478
|
+
cdr;
|
|
1479
|
+
scaleService;
|
|
1480
|
+
zoomService;
|
|
1481
|
+
element;
|
|
1482
|
+
transform;
|
|
1483
|
+
display;
|
|
1484
|
+
path;
|
|
1485
|
+
x;
|
|
1486
|
+
y;
|
|
1398
1487
|
constructor(svc, cdr, scaleService, zoomService, element) {
|
|
1399
1488
|
super(svc, cdr, scaleService, zoomService, element);
|
|
1400
1489
|
this.svc = svc;
|
|
@@ -1421,15 +1510,26 @@ class ScatterSeriesComponent extends SeriesBaseComponent {
|
|
|
1421
1510
|
series: this.series,
|
|
1422
1511
|
});
|
|
1423
1512
|
}
|
|
1513
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ScatterSeriesComponent, deps: [{ token: ChartService }, { token: i0.ChangeDetectorRef }, { token: ScaleService }, { token: ZoomService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1514
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: ScatterSeriesComponent, selector: "svg:svg[teta-scatter-series]", usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"{\n y: y | async,\n x: x | async\n} as scales\">\n <ng-container *ngIf=\"scales.x && scales.y\">\n <svg:circle\n class=\"line\"\n *ngFor=\"let point of series.data\"\n (mouseenter)=\"mouseenter(point)\"\n (mouseleave)=\"mouseleave(point)\"\n [attr.cx]=\"scales.x(point.x)\"\n [attr.cy]=\"scales.y(point.y)\"\n [attr.r]=\"series.style?.radius ?? 1\"\n [attr.stroke]=\"point.color ?? series.color\"\n [attr.fill]=\"point.color ?? series.color\"\n [attr.stroke-width]=\"series.style?.strokeWidth\">\n </svg:circle>\n </ng-container>\n</ng-container>\n\n\n\n", styles: [".draggable-marker{cursor:move}.active{stroke-opacity:.5}.marker-grab{opacity:0}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1424
1515
|
}
|
|
1425
|
-
|
|
1426
|
-
ScatterSeriesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: ScatterSeriesComponent, selector: "svg:svg[teta-scatter-series]", usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"{\n y: y | async,\n x: x | async\n} as scales\">\n <ng-container *ngIf=\"scales.x && scales.y\">\n <svg:circle\n class=\"line\"\n *ngFor=\"let point of series.data\"\n (mouseenter)=\"mouseenter(point)\"\n (mouseleave)=\"mouseleave(point)\"\n [attr.cx]=\"scales.x(point.x)\"\n [attr.cy]=\"scales.y(point.y)\"\n [attr.r]=\"series.style?.radius ?? 1\"\n [attr.stroke]=\"point.color ?? series.color\"\n [attr.fill]=\"point.color ?? series.color\"\n [attr.stroke-width]=\"series.style?.strokeWidth\">\n </svg:circle>\n </ng-container>\n</ng-container>\n\n\n\n", styles: [".draggable-marker{cursor:move}.active{stroke-opacity:.5}.marker-grab{opacity:0}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1427
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: ScatterSeriesComponent, decorators: [{
|
|
1516
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ScatterSeriesComponent, decorators: [{
|
|
1428
1517
|
type: Component,
|
|
1429
1518
|
args: [{ selector: 'svg:svg[teta-scatter-series]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"{\n y: y | async,\n x: x | async\n} as scales\">\n <ng-container *ngIf=\"scales.x && scales.y\">\n <svg:circle\n class=\"line\"\n *ngFor=\"let point of series.data\"\n (mouseenter)=\"mouseenter(point)\"\n (mouseleave)=\"mouseleave(point)\"\n [attr.cx]=\"scales.x(point.x)\"\n [attr.cy]=\"scales.y(point.y)\"\n [attr.r]=\"series.style?.radius ?? 1\"\n [attr.stroke]=\"point.color ?? series.color\"\n [attr.fill]=\"point.color ?? series.color\"\n [attr.stroke-width]=\"series.style?.strokeWidth\">\n </svg:circle>\n </ng-container>\n</ng-container>\n\n\n\n", styles: [".draggable-marker{cursor:move}.active{stroke-opacity:.5}.marker-grab{opacity:0}\n"] }]
|
|
1430
1519
|
}], ctorParameters: function () { return [{ type: ChartService }, { type: i0.ChangeDetectorRef }, { type: ScaleService }, { type: ZoomService }, { type: i0.ElementRef }]; } });
|
|
1431
1520
|
|
|
1432
1521
|
class BlockSeriesComponent extends SeriesBaseComponent {
|
|
1522
|
+
svc;
|
|
1523
|
+
cdr;
|
|
1524
|
+
scaleService;
|
|
1525
|
+
zoomService;
|
|
1526
|
+
element;
|
|
1527
|
+
x;
|
|
1528
|
+
y;
|
|
1529
|
+
displayPoints;
|
|
1530
|
+
fillType = FillType;
|
|
1531
|
+
id;
|
|
1532
|
+
Math = Math;
|
|
1433
1533
|
constructor(svc, cdr, scaleService, zoomService, element) {
|
|
1434
1534
|
super(svc, cdr, scaleService, zoomService, element);
|
|
1435
1535
|
this.svc = svc;
|
|
@@ -1437,8 +1537,6 @@ class BlockSeriesComponent extends SeriesBaseComponent {
|
|
|
1437
1537
|
this.scaleService = scaleService;
|
|
1438
1538
|
this.zoomService = zoomService;
|
|
1439
1539
|
this.element = element;
|
|
1440
|
-
this.fillType = FillType;
|
|
1441
|
-
this.Math = Math;
|
|
1442
1540
|
this.id = (Date.now() + Math.random()).toString(36);
|
|
1443
1541
|
}
|
|
1444
1542
|
ngOnInit() {
|
|
@@ -1472,15 +1570,26 @@ class BlockSeriesComponent extends SeriesBaseComponent {
|
|
|
1472
1570
|
}
|
|
1473
1571
|
ngAfterViewInit() {
|
|
1474
1572
|
}
|
|
1573
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: BlockSeriesComponent, deps: [{ token: ChartService }, { token: i0.ChangeDetectorRef }, { token: ScaleService }, { token: ZoomService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1574
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: BlockSeriesComponent, selector: "svg:svg[teta-block-series]", usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"{\n y: y | async,\n x: x | async,\n points: displayPoints | async\n} as data\">\n <svg:defs *ngIf=\"series?.fillType === fillType.gradient\">\n <svg:linearGradient [id]=\"'gradient-fill-' + id\" gradientUnits=\"userSpaceOnUse\"\n x1=\"0%\"\n [attr.y1]=\"config?.inverted ? '0%' : '100%'\"\n [attr.x2]=\"config?.inverted ? '100%' : '0%'\"\n y2=\"0%\">\n <svg:stop offset=\"0%\" [attr.stop-color]=\"series.style?.fill ?? series.color\" stop-opacity=\"0\"></svg:stop>\n <svg:stop offset=\"5%\" [attr.stop-color]=\"series.style?.fill ?? series.color\" stop-opacity=\"0.1\"></svg:stop>\n <svg:stop offset=\"20%\" [attr.stop-color]=\"series.style?.fill ?? series.color\" stop-opacity=\"0.2\"></svg:stop>\n <svg:stop offset=\"60%\" [attr.stop-color]=\"series.style?.fill ?? series.color\" stop-opacity=\"0.5\"></svg:stop>\n <svg:stop offset=\"100%\" [attr.stop-color]=\"series.style?.fill ?? series.color\" stop-opacity=\"0.9\"></svg:stop>\n </svg:linearGradient>\n </svg:defs>\n <ng-container *ngIf=\"data.x && data.y\">\n <ng-container *ngFor=\"let point of data.points\">\n <svg:g (mouseenter)=\"mouseenter(point)\"\n (mouseleave)=\"mouseleave(point)\">\n <svg:rect\n x=\"0\"\n [attr.y]=\"data.y(point.y)\"\n [attr.height]=\"Math.abs(data.y(point.y1) - data.y(point.y))\"\n [attr.fill]=\"series.fillType === fillType.gradient ? 'url(#gradient-fill-'+id+')' : point.iconId ? 'url(#pattern'+point.iconId+')' : point.color ?? series.style?.fill ?? series.color\"\n [attr.fill-opacity]=\"series.style?.fillOpacity\"\n width=\"100%\">\n </svg:rect>\n <svg:text *ngIf=\"point.text && data.y(point.y1) - data.y(point.y) > 8\"\n x=\"50%\"\n [attr.y]=\"(data.y(point.y1) + data.y(point.y)) / 2\"\n alignment-baseline=\"middle\"\n text-anchor=\"middle\">{{ point.text }}\n </svg:text>\n <svg:line x1=\"0\" x2=\"100%\" [attr.y1]=\"data.y(point.y)\" [attr.y2]=\"data.y(point.y)\"\n [attr.stroke]=\"point.iconId ? 'var(--color-text-10)' : point.color ?? series.style?.stroke ?? series.color\"></svg:line>\n <svg:line x1=\"0\" x2=\"100%\" [attr.y1]=\"data.y(point.y1)\" [attr.y2]=\"data.y(point.y1)\"\n [attr.stroke]=\"point.iconId ? 'var(--color-text-10)' : point.color ?? series.style?.stroke ?? series.color\"></svg:line>\n </svg:g>\n </ng-container>\n\n </ng-container>\n</ng-container>\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1475
1575
|
}
|
|
1476
|
-
|
|
1477
|
-
BlockSeriesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: BlockSeriesComponent, selector: "svg:svg[teta-block-series]", usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"{\n y: y | async,\n x: x | async,\n points: displayPoints | async\n} as data\">\n <svg:defs *ngIf=\"series?.fillType === fillType.gradient\">\n <svg:linearGradient [id]=\"'gradient-fill-' + id\" gradientUnits=\"userSpaceOnUse\"\n x1=\"0%\"\n [attr.y1]=\"config?.inverted ? '0%' : '100%'\"\n [attr.x2]=\"config?.inverted ? '100%' : '0%'\"\n y2=\"0%\">\n <svg:stop offset=\"0%\" [attr.stop-color]=\"series.style?.fill ?? series.color\" stop-opacity=\"0\"></svg:stop>\n <svg:stop offset=\"5%\" [attr.stop-color]=\"series.style?.fill ?? series.color\" stop-opacity=\"0.1\"></svg:stop>\n <svg:stop offset=\"20%\" [attr.stop-color]=\"series.style?.fill ?? series.color\" stop-opacity=\"0.2\"></svg:stop>\n <svg:stop offset=\"60%\" [attr.stop-color]=\"series.style?.fill ?? series.color\" stop-opacity=\"0.5\"></svg:stop>\n <svg:stop offset=\"100%\" [attr.stop-color]=\"series.style?.fill ?? series.color\" stop-opacity=\"0.9\"></svg:stop>\n </svg:linearGradient>\n </svg:defs>\n <ng-container *ngIf=\"data.x && data.y\">\n <ng-container *ngFor=\"let point of data.points\">\n <svg:g (mouseenter)=\"mouseenter(point)\"\n (mouseleave)=\"mouseleave(point)\">\n <svg:rect\n x=\"0\"\n [attr.y]=\"data.y(point.y)\"\n [attr.height]=\"Math.abs(data.y(point.y1) - data.y(point.y))\"\n [attr.fill]=\"series.fillType === fillType.gradient ? 'url(#gradient-fill-'+id+')' : point.iconId ? 'url(#pattern'+point.iconId+')' : point.color ?? series.style?.fill ?? series.color\"\n [attr.fill-opacity]=\"series.style?.fillOpacity\"\n width=\"100%\">\n </svg:rect>\n <svg:text *ngIf=\"point.text && data.y(point.y1) - data.y(point.y) > 8\"\n x=\"50%\"\n [attr.y]=\"(data.y(point.y1) + data.y(point.y)) / 2\"\n alignment-baseline=\"middle\"\n text-anchor=\"middle\">{{ point.text }}\n </svg:text>\n <svg:line x1=\"0\" x2=\"100%\" [attr.y1]=\"data.y(point.y)\" [attr.y2]=\"data.y(point.y)\"\n [attr.stroke]=\"point.iconId ? 'var(--color-text-10)' : point.color ?? series.style?.stroke ?? series.color\"></svg:line>\n <svg:line x1=\"0\" x2=\"100%\" [attr.y1]=\"data.y(point.y1)\" [attr.y2]=\"data.y(point.y1)\"\n [attr.stroke]=\"point.iconId ? 'var(--color-text-10)' : point.color ?? series.style?.stroke ?? series.color\"></svg:line>\n </svg:g>\n </ng-container>\n\n </ng-container>\n</ng-container>\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1478
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: BlockSeriesComponent, decorators: [{
|
|
1576
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: BlockSeriesComponent, decorators: [{
|
|
1479
1577
|
type: Component,
|
|
1480
1578
|
args: [{ selector: 'svg:svg[teta-block-series]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"{\n y: y | async,\n x: x | async,\n points: displayPoints | async\n} as data\">\n <svg:defs *ngIf=\"series?.fillType === fillType.gradient\">\n <svg:linearGradient [id]=\"'gradient-fill-' + id\" gradientUnits=\"userSpaceOnUse\"\n x1=\"0%\"\n [attr.y1]=\"config?.inverted ? '0%' : '100%'\"\n [attr.x2]=\"config?.inverted ? '100%' : '0%'\"\n y2=\"0%\">\n <svg:stop offset=\"0%\" [attr.stop-color]=\"series.style?.fill ?? series.color\" stop-opacity=\"0\"></svg:stop>\n <svg:stop offset=\"5%\" [attr.stop-color]=\"series.style?.fill ?? series.color\" stop-opacity=\"0.1\"></svg:stop>\n <svg:stop offset=\"20%\" [attr.stop-color]=\"series.style?.fill ?? series.color\" stop-opacity=\"0.2\"></svg:stop>\n <svg:stop offset=\"60%\" [attr.stop-color]=\"series.style?.fill ?? series.color\" stop-opacity=\"0.5\"></svg:stop>\n <svg:stop offset=\"100%\" [attr.stop-color]=\"series.style?.fill ?? series.color\" stop-opacity=\"0.9\"></svg:stop>\n </svg:linearGradient>\n </svg:defs>\n <ng-container *ngIf=\"data.x && data.y\">\n <ng-container *ngFor=\"let point of data.points\">\n <svg:g (mouseenter)=\"mouseenter(point)\"\n (mouseleave)=\"mouseleave(point)\">\n <svg:rect\n x=\"0\"\n [attr.y]=\"data.y(point.y)\"\n [attr.height]=\"Math.abs(data.y(point.y1) - data.y(point.y))\"\n [attr.fill]=\"series.fillType === fillType.gradient ? 'url(#gradient-fill-'+id+')' : point.iconId ? 'url(#pattern'+point.iconId+')' : point.color ?? series.style?.fill ?? series.color\"\n [attr.fill-opacity]=\"series.style?.fillOpacity\"\n width=\"100%\">\n </svg:rect>\n <svg:text *ngIf=\"point.text && data.y(point.y1) - data.y(point.y) > 8\"\n x=\"50%\"\n [attr.y]=\"(data.y(point.y1) + data.y(point.y)) / 2\"\n alignment-baseline=\"middle\"\n text-anchor=\"middle\">{{ point.text }}\n </svg:text>\n <svg:line x1=\"0\" x2=\"100%\" [attr.y1]=\"data.y(point.y)\" [attr.y2]=\"data.y(point.y)\"\n [attr.stroke]=\"point.iconId ? 'var(--color-text-10)' : point.color ?? series.style?.stroke ?? series.color\"></svg:line>\n <svg:line x1=\"0\" x2=\"100%\" [attr.y1]=\"data.y(point.y1)\" [attr.y2]=\"data.y(point.y1)\"\n [attr.stroke]=\"point.iconId ? 'var(--color-text-10)' : point.color ?? series.style?.stroke ?? series.color\"></svg:line>\n </svg:g>\n </ng-container>\n\n </ng-container>\n</ng-container>\n" }]
|
|
1481
1579
|
}], ctorParameters: function () { return [{ type: ChartService }, { type: i0.ChangeDetectorRef }, { type: ScaleService }, { type: ZoomService }, { type: i0.ElementRef }]; } });
|
|
1482
1580
|
|
|
1483
1581
|
class BlockAreaSeriesComponent extends SeriesBaseComponent {
|
|
1582
|
+
svc;
|
|
1583
|
+
cdr;
|
|
1584
|
+
scaleService;
|
|
1585
|
+
zoomService;
|
|
1586
|
+
element;
|
|
1587
|
+
x;
|
|
1588
|
+
y;
|
|
1589
|
+
displayPoints;
|
|
1590
|
+
fillType = FillType;
|
|
1591
|
+
id;
|
|
1592
|
+
Math = Math;
|
|
1484
1593
|
constructor(svc, cdr, scaleService, zoomService, element) {
|
|
1485
1594
|
super(svc, cdr, scaleService, zoomService, element);
|
|
1486
1595
|
this.svc = svc;
|
|
@@ -1488,8 +1597,6 @@ class BlockAreaSeriesComponent extends SeriesBaseComponent {
|
|
|
1488
1597
|
this.scaleService = scaleService;
|
|
1489
1598
|
this.zoomService = zoomService;
|
|
1490
1599
|
this.element = element;
|
|
1491
|
-
this.fillType = FillType;
|
|
1492
|
-
this.Math = Math;
|
|
1493
1600
|
this.id = (Date.now() + Math.random()).toString(36);
|
|
1494
1601
|
}
|
|
1495
1602
|
ngOnInit() {
|
|
@@ -1523,15 +1630,24 @@ class BlockAreaSeriesComponent extends SeriesBaseComponent {
|
|
|
1523
1630
|
series: this.series,
|
|
1524
1631
|
});
|
|
1525
1632
|
}
|
|
1633
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: BlockAreaSeriesComponent, deps: [{ token: ChartService }, { token: i0.ChangeDetectorRef }, { token: ScaleService }, { token: ZoomService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1634
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: BlockAreaSeriesComponent, selector: "svg:svg[teta-block-area-series]", usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"{\n y: y | async,\n x: x | async,\n points: displayPoints | async\n} as data\">\n <svg:defs *ngIf=\"series?.fillType === fillType.gradient\">\n <svg:linearGradient [id]=\"'gradient-fill-' + id\"\n gradientUnits=\"userSpaceOnUse\"\n x1=\"0%\"\n [attr.y1]=\"config?.inverted ? '0%' : '100%'\"\n [attr.x2]=\"config?.inverted ? '100%' : '0%'\"\n y2=\"0%\">\n <svg:stop offset=\"0%\" [attr.stop-color]=\"series.style?.fill ?? series.color\" stop-opacity=\"0\"></svg:stop>\n <svg:stop offset=\"5%\" [attr.stop-color]=\"series.style?.fill ?? series.color\" stop-opacity=\"0.1\"></svg:stop>\n <svg:stop offset=\"20%\" [attr.stop-color]=\"series.style?.fill ?? series.color\" stop-opacity=\"0.2\"></svg:stop>\n <svg:stop offset=\"60%\" [attr.stop-color]=\"series.style?.fill ?? series.color\" stop-opacity=\"0.5\"></svg:stop>\n <svg:stop offset=\"100%\" [attr.stop-color]=\"series.style?.fill ?? series.color\" stop-opacity=\"0.9\"></svg:stop>\n </svg:linearGradient>\n </svg:defs>\n <ng-container *ngIf=\"data.x && data.y\">\n\n\n <ng-container *ngFor=\"let point of data.points\">\n <svg:g (mouseenter)=\"mouseenter(point)\"\n (mouseleave)=\"mouseleave(point)\">\n <svg:rect\n *ngIf=\"!!config.inverted\"\n [attr.x]=\"data.x(0) < data.x(point.x) ? data.x(0) : data.x(point.x)\"\n [attr.y]=\"data.y(point.y)\"\n [attr.height]=\"Math.abs(data.y(point.y1) - data.y(point.y))\"\n [attr.width]=\"data.x(0) < data.x(point.x) ? data.x(point.x) - data.x(0) : data.x(0) - data.x(point.x)\"\n [attr.stroke]=\"point.iconId ? '' : point.color ?? series.style?.stroke ?? series.color\"\n [attr.stroke-dasharray]=\"series.style?.strokeDasharray\"\n [attr.stroke-width]=\"series.style?.strokeWidth\"\n [attr.fill]=\"series.fillType === fillType.gradient ? 'url(#gradient-fill-'+id+')' : point.iconId ? 'url(#pattern'+point.iconId+')' : point.color ?? series.style?.fill ?? series.color\"\n [attr.fill-opacity]=\"series.style?.fillOpacity\">\n </svg:rect>\n <svg:rect\n *ngIf=\"!config.inverted\"\n [attr.x]=\"data.x(point.x)\"\n [attr.y]=\"data.y(0)\"\n [attr.height]=\"Math.abs(data.y(0) - data.y(point.y))\"\n [attr.width]=\"data.x(point.x1) - data.x(point.x)\"\n [attr.stroke]=\"point.iconId ? '' : point.color ?? series.color\"\n [attr.stroke-dasharray]=\"series.style?.strokeDasharray\"\n [attr.stroke-width]=\"series.style?.strokeWidth\"\n [attr.fill]=\"series.fillType === fillType.gradient ? 'url(#gradient-fill-'+id+')' : point.iconId ? 'url(#pattern'+point.iconId+')' : point.color ?? series.color\"\n [attr.fill-opacity]=\"series.style?.fillOpacity\">\n </svg:rect>\n <svg:text *ngIf=\"point.text\"\n x=\"50%\"\n [attr.y]=\"(data.y(point.y1) + data.y(point.y)) / 2\"\n alignment-baseline=\"middle\"\n text-anchor=\"middle\">{{ point.text }}\n </svg:text>\n\n <!-- <svg:line x1=\"0\" x2=\"100%\" [attr.y1]=\"data.y(point.y)\" [attr.y2]=\"data.y(point.y)\" [attr.stroke]=\"point.iconId ? 'var(--color-text-10)' : point.color ?? series.color\"></svg:line>-->\n <!-- <svg:line x1=\"0\" x2=\"100%\" [attr.y1]=\"data.y(point.y1)\" [attr.y2]=\"data.y(point.y1)\" [attr.stroke]=\"point.iconId ? 'var(--color-text-10)' : point.color ?? series.color\"></svg:line>-->\n\n </svg:g>\n </ng-container>\n\n </ng-container>\n</ng-container>\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1526
1635
|
}
|
|
1527
|
-
|
|
1528
|
-
BlockAreaSeriesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: BlockAreaSeriesComponent, selector: "svg:svg[teta-block-area-series]", usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"{\n y: y | async,\n x: x | async,\n points: displayPoints | async\n} as data\">\n <svg:defs *ngIf=\"series?.fillType === fillType.gradient\">\n <svg:linearGradient [id]=\"'gradient-fill-' + id\"\n gradientUnits=\"userSpaceOnUse\"\n x1=\"0%\"\n [attr.y1]=\"config?.inverted ? '0%' : '100%'\"\n [attr.x2]=\"config?.inverted ? '100%' : '0%'\"\n y2=\"0%\">\n <svg:stop offset=\"0%\" [attr.stop-color]=\"series.style?.fill ?? series.color\" stop-opacity=\"0\"></svg:stop>\n <svg:stop offset=\"5%\" [attr.stop-color]=\"series.style?.fill ?? series.color\" stop-opacity=\"0.1\"></svg:stop>\n <svg:stop offset=\"20%\" [attr.stop-color]=\"series.style?.fill ?? series.color\" stop-opacity=\"0.2\"></svg:stop>\n <svg:stop offset=\"60%\" [attr.stop-color]=\"series.style?.fill ?? series.color\" stop-opacity=\"0.5\"></svg:stop>\n <svg:stop offset=\"100%\" [attr.stop-color]=\"series.style?.fill ?? series.color\" stop-opacity=\"0.9\"></svg:stop>\n </svg:linearGradient>\n </svg:defs>\n <ng-container *ngIf=\"data.x && data.y\">\n\n\n <ng-container *ngFor=\"let point of data.points\">\n <svg:g (mouseenter)=\"mouseenter(point)\"\n (mouseleave)=\"mouseleave(point)\">\n <svg:rect\n *ngIf=\"!!config.inverted\"\n [attr.x]=\"data.x(0) < data.x(point.x) ? data.x(0) : data.x(point.x)\"\n [attr.y]=\"data.y(point.y)\"\n [attr.height]=\"Math.abs(data.y(point.y1) - data.y(point.y))\"\n [attr.width]=\"data.x(0) < data.x(point.x) ? data.x(point.x) - data.x(0) : data.x(0) - data.x(point.x)\"\n [attr.stroke]=\"point.iconId ? '' : point.color ?? series.style?.stroke ?? series.color\"\n [attr.stroke-dasharray]=\"series.style?.strokeDasharray\"\n [attr.stroke-width]=\"series.style?.strokeWidth\"\n [attr.fill]=\"series.fillType === fillType.gradient ? 'url(#gradient-fill-'+id+')' : point.iconId ? 'url(#pattern'+point.iconId+')' : point.color ?? series.style?.fill ?? series.color\"\n [attr.fill-opacity]=\"series.style?.fillOpacity\">\n </svg:rect>\n <svg:rect\n *ngIf=\"!config.inverted\"\n [attr.x]=\"data.x(point.x)\"\n [attr.y]=\"data.y(0)\"\n [attr.height]=\"Math.abs(data.y(0) - data.y(point.y))\"\n [attr.width]=\"data.x(point.x1) - data.x(point.x)\"\n [attr.stroke]=\"point.iconId ? '' : point.color ?? series.color\"\n [attr.stroke-dasharray]=\"series.style?.strokeDasharray\"\n [attr.stroke-width]=\"series.style?.strokeWidth\"\n [attr.fill]=\"series.fillType === fillType.gradient ? 'url(#gradient-fill-'+id+')' : point.iconId ? 'url(#pattern'+point.iconId+')' : point.color ?? series.color\"\n [attr.fill-opacity]=\"series.style?.fillOpacity\">\n </svg:rect>\n <svg:text *ngIf=\"point.text\"\n x=\"50%\"\n [attr.y]=\"(data.y(point.y1) + data.y(point.y)) / 2\"\n alignment-baseline=\"middle\"\n text-anchor=\"middle\">{{ point.text }}\n </svg:text>\n\n <!-- <svg:line x1=\"0\" x2=\"100%\" [attr.y1]=\"data.y(point.y)\" [attr.y2]=\"data.y(point.y)\" [attr.stroke]=\"point.iconId ? 'var(--color-text-10)' : point.color ?? series.color\"></svg:line>-->\n <!-- <svg:line x1=\"0\" x2=\"100%\" [attr.y1]=\"data.y(point.y1)\" [attr.y2]=\"data.y(point.y1)\" [attr.stroke]=\"point.iconId ? 'var(--color-text-10)' : point.color ?? series.color\"></svg:line>-->\n\n </svg:g>\n </ng-container>\n\n </ng-container>\n</ng-container>\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1529
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: BlockAreaSeriesComponent, decorators: [{
|
|
1636
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: BlockAreaSeriesComponent, decorators: [{
|
|
1530
1637
|
type: Component,
|
|
1531
1638
|
args: [{ selector: 'svg:svg[teta-block-area-series]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"{\n y: y | async,\n x: x | async,\n points: displayPoints | async\n} as data\">\n <svg:defs *ngIf=\"series?.fillType === fillType.gradient\">\n <svg:linearGradient [id]=\"'gradient-fill-' + id\"\n gradientUnits=\"userSpaceOnUse\"\n x1=\"0%\"\n [attr.y1]=\"config?.inverted ? '0%' : '100%'\"\n [attr.x2]=\"config?.inverted ? '100%' : '0%'\"\n y2=\"0%\">\n <svg:stop offset=\"0%\" [attr.stop-color]=\"series.style?.fill ?? series.color\" stop-opacity=\"0\"></svg:stop>\n <svg:stop offset=\"5%\" [attr.stop-color]=\"series.style?.fill ?? series.color\" stop-opacity=\"0.1\"></svg:stop>\n <svg:stop offset=\"20%\" [attr.stop-color]=\"series.style?.fill ?? series.color\" stop-opacity=\"0.2\"></svg:stop>\n <svg:stop offset=\"60%\" [attr.stop-color]=\"series.style?.fill ?? series.color\" stop-opacity=\"0.5\"></svg:stop>\n <svg:stop offset=\"100%\" [attr.stop-color]=\"series.style?.fill ?? series.color\" stop-opacity=\"0.9\"></svg:stop>\n </svg:linearGradient>\n </svg:defs>\n <ng-container *ngIf=\"data.x && data.y\">\n\n\n <ng-container *ngFor=\"let point of data.points\">\n <svg:g (mouseenter)=\"mouseenter(point)\"\n (mouseleave)=\"mouseleave(point)\">\n <svg:rect\n *ngIf=\"!!config.inverted\"\n [attr.x]=\"data.x(0) < data.x(point.x) ? data.x(0) : data.x(point.x)\"\n [attr.y]=\"data.y(point.y)\"\n [attr.height]=\"Math.abs(data.y(point.y1) - data.y(point.y))\"\n [attr.width]=\"data.x(0) < data.x(point.x) ? data.x(point.x) - data.x(0) : data.x(0) - data.x(point.x)\"\n [attr.stroke]=\"point.iconId ? '' : point.color ?? series.style?.stroke ?? series.color\"\n [attr.stroke-dasharray]=\"series.style?.strokeDasharray\"\n [attr.stroke-width]=\"series.style?.strokeWidth\"\n [attr.fill]=\"series.fillType === fillType.gradient ? 'url(#gradient-fill-'+id+')' : point.iconId ? 'url(#pattern'+point.iconId+')' : point.color ?? series.style?.fill ?? series.color\"\n [attr.fill-opacity]=\"series.style?.fillOpacity\">\n </svg:rect>\n <svg:rect\n *ngIf=\"!config.inverted\"\n [attr.x]=\"data.x(point.x)\"\n [attr.y]=\"data.y(0)\"\n [attr.height]=\"Math.abs(data.y(0) - data.y(point.y))\"\n [attr.width]=\"data.x(point.x1) - data.x(point.x)\"\n [attr.stroke]=\"point.iconId ? '' : point.color ?? series.color\"\n [attr.stroke-dasharray]=\"series.style?.strokeDasharray\"\n [attr.stroke-width]=\"series.style?.strokeWidth\"\n [attr.fill]=\"series.fillType === fillType.gradient ? 'url(#gradient-fill-'+id+')' : point.iconId ? 'url(#pattern'+point.iconId+')' : point.color ?? series.color\"\n [attr.fill-opacity]=\"series.style?.fillOpacity\">\n </svg:rect>\n <svg:text *ngIf=\"point.text\"\n x=\"50%\"\n [attr.y]=\"(data.y(point.y1) + data.y(point.y)) / 2\"\n alignment-baseline=\"middle\"\n text-anchor=\"middle\">{{ point.text }}\n </svg:text>\n\n <!-- <svg:line x1=\"0\" x2=\"100%\" [attr.y1]=\"data.y(point.y)\" [attr.y2]=\"data.y(point.y)\" [attr.stroke]=\"point.iconId ? 'var(--color-text-10)' : point.color ?? series.color\"></svg:line>-->\n <!-- <svg:line x1=\"0\" x2=\"100%\" [attr.y1]=\"data.y(point.y1)\" [attr.y2]=\"data.y(point.y1)\" [attr.stroke]=\"point.iconId ? 'var(--color-text-10)' : point.color ?? series.color\"></svg:line>-->\n\n </svg:g>\n </ng-container>\n\n </ng-container>\n</ng-container>\n" }]
|
|
1532
1639
|
}], ctorParameters: function () { return [{ type: ChartService }, { type: i0.ChangeDetectorRef }, { type: ScaleService }, { type: ZoomService }, { type: i0.ElementRef }]; } });
|
|
1533
1640
|
|
|
1534
1641
|
class AreaSeriesComponent extends LinearSeriesBase {
|
|
1642
|
+
svc;
|
|
1643
|
+
cdr;
|
|
1644
|
+
scaleService;
|
|
1645
|
+
zoomService;
|
|
1646
|
+
element;
|
|
1647
|
+
areaPath;
|
|
1648
|
+
fillDirection = FillDirection;
|
|
1649
|
+
fillType = FillType;
|
|
1650
|
+
id;
|
|
1535
1651
|
constructor(svc, cdr, scaleService, zoomService, element) {
|
|
1536
1652
|
super(svc, cdr, scaleService, zoomService, element);
|
|
1537
1653
|
this.svc = svc;
|
|
@@ -1539,8 +1655,6 @@ class AreaSeriesComponent extends LinearSeriesBase {
|
|
|
1539
1655
|
this.scaleService = scaleService;
|
|
1540
1656
|
this.zoomService = zoomService;
|
|
1541
1657
|
this.element = element;
|
|
1542
|
-
this.fillDirection = FillDirection;
|
|
1543
|
-
this.fillType = FillType;
|
|
1544
1658
|
this.id = (Date.now() + Math.random()).toString(36);
|
|
1545
1659
|
}
|
|
1546
1660
|
ngOnInit() {
|
|
@@ -1579,10 +1693,10 @@ class AreaSeriesComponent extends LinearSeriesBase {
|
|
|
1579
1693
|
return area(filteredData);
|
|
1580
1694
|
}));
|
|
1581
1695
|
}
|
|
1696
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: AreaSeriesComponent, deps: [{ token: ChartService }, { token: i0.ChangeDetectorRef }, { token: ScaleService }, { token: ZoomService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1697
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: AreaSeriesComponent, selector: "svg:svg[teta-area-series]", usesInheritance: true, ngImport: i0, template: "<svg:defs *ngIf=\"series?.fillType === fillType.gradient\">\n <svg:linearGradient [id]=\"'gradient-fill-' + id\" gradientUnits=\"userSpaceOnUse\"\n x1=\"0%\"\n [attr.y1]=\"config?.inverted || series?.fillDirection === fillDirection.y ? '0%' : '100%'\"\n [attr.x2]=\"config?.inverted || series?.fillDirection === fillDirection.y ? '100%' : '0%'\"\n y2=\"0%\">\n <svg:stop offset=\"0%\" [attr.stop-color]=\"series.color\" stop-opacity=\"0\"></svg:stop>\n <svg:stop offset=\"5%\" [attr.stop-color]=\"series.color\" stop-opacity=\"0.1\"></svg:stop>\n <svg:stop offset=\"20%\" [attr.stop-color]=\"series.color\" stop-opacity=\"0.2\"></svg:stop>\n <svg:stop offset=\"60%\" [attr.stop-color]=\"series.color\" stop-opacity=\"0.5\"></svg:stop>\n <svg:stop offset=\"100%\" [attr.stop-color]=\"series.color\" stop-opacity=\"0.8\"></svg:stop>\n </svg:linearGradient>\n</svg:defs>\n<svg:path\n class=\"area\"\n [attr.d]=\"areaPath | async\"\n [attr.stroke-width]=\"0\"\n [attr.fill-opacity]=\"series.style?.fillOpacity\"\n [attr.fill]=\"series.fillType === fillType.gradient ? 'url(#gradient-fill-'+id+')' : series.style?.fill ?? series.color\">\n</svg:path>\n<svg:path\n class=\"area\"\n fill=\"none\"\n [attr.d]=\"path | async\"\n [attr.stroke]=\"series.color\"\n [attr.stroke-dasharray]=\"series.style?.strokeDasharray\"\n [attr.stroke-width]=\"series.style?.strokeWidth\">\n</svg:path>\n<ng-container *ngIf=\"transform | async as t\">\n <svg:circle\n *ngIf=\"t?.x !=null && t?.y !=null\"\n r=\"3\"\n [attr.fill]=\"series.color\"\n [attr.transform]=\"'translate('+ t.x +', '+ t.y +')'\"\n >\n </svg:circle>\n</ng-container>\n<ng-container *ngIf=\"markers as draggablePoints\">\n <svg:circle\n class=\"marker\"\n *ngFor=\"let point of draggablePoints\"\n [class.draggable-marker]=\"point?.marker?.draggable\"\n [attr.r]=\"point.marker.style?.radius ?? 5\"\n [attr.fill]=\"point.marker.style?.fill ?? 'transparent'\"\n [attr.stroke]=\"point.marker.style?.stroke ?? 'none'\"\n [attr.stroke-width]=\"point.marker.style?.strokeWidth\"\n [attr.stroke-dasharray]=\"point.marker.style?.strokeDasharray\"\n [attr.cx]=\"x(point.x)\"\n [attr.cy]=\"y(point.y)\"\n >\n </svg:circle>\n</ng-container>\n\n\n\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1582
1698
|
}
|
|
1583
|
-
|
|
1584
|
-
AreaSeriesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: AreaSeriesComponent, selector: "svg:svg[teta-area-series]", usesInheritance: true, ngImport: i0, template: "<svg:defs *ngIf=\"series?.fillType === fillType.gradient\">\n <svg:linearGradient [id]=\"'gradient-fill-' + id\" gradientUnits=\"userSpaceOnUse\"\n x1=\"0%\"\n [attr.y1]=\"config?.inverted || series?.fillDirection === fillDirection.y ? '0%' : '100%'\"\n [attr.x2]=\"config?.inverted || series?.fillDirection === fillDirection.y ? '100%' : '0%'\"\n y2=\"0%\">\n <svg:stop offset=\"0%\" [attr.stop-color]=\"series.color\" stop-opacity=\"0\"></svg:stop>\n <svg:stop offset=\"5%\" [attr.stop-color]=\"series.color\" stop-opacity=\"0.1\"></svg:stop>\n <svg:stop offset=\"20%\" [attr.stop-color]=\"series.color\" stop-opacity=\"0.2\"></svg:stop>\n <svg:stop offset=\"60%\" [attr.stop-color]=\"series.color\" stop-opacity=\"0.5\"></svg:stop>\n <svg:stop offset=\"100%\" [attr.stop-color]=\"series.color\" stop-opacity=\"0.8\"></svg:stop>\n </svg:linearGradient>\n</svg:defs>\n<svg:path\n class=\"area\"\n [attr.d]=\"areaPath | async\"\n [attr.stroke-width]=\"0\"\n [attr.fill-opacity]=\"series.style?.fillOpacity\"\n [attr.fill]=\"series.fillType === fillType.gradient ? 'url(#gradient-fill-'+id+')' : series.style?.fill ?? series.color\">\n</svg:path>\n<svg:path\n class=\"area\"\n fill=\"none\"\n [attr.d]=\"path | async\"\n [attr.stroke]=\"series.color\"\n [attr.stroke-dasharray]=\"series.style?.strokeDasharray\"\n [attr.stroke-width]=\"series.style?.strokeWidth\">\n</svg:path>\n<ng-container *ngIf=\"transform | async as t\">\n <svg:circle\n *ngIf=\"t?.x !=null && t?.y !=null\"\n r=\"3\"\n [attr.fill]=\"series.color\"\n [attr.transform]=\"'translate('+ t.x +', '+ t.y +')'\"\n >\n </svg:circle>\n</ng-container>\n<ng-container *ngIf=\"markers as draggablePoints\">\n <svg:circle\n class=\"marker\"\n *ngFor=\"let point of draggablePoints\"\n [class.draggable-marker]=\"point?.marker?.draggable\"\n [attr.r]=\"point.marker.style?.radius ?? 5\"\n [attr.fill]=\"point.marker.style?.fill ?? 'transparent'\"\n [attr.stroke]=\"point.marker.style?.stroke ?? 'none'\"\n [attr.stroke-width]=\"point.marker.style?.strokeWidth\"\n [attr.stroke-dasharray]=\"point.marker.style?.strokeDasharray\"\n [attr.cx]=\"x(point.x)\"\n [attr.cy]=\"y(point.y)\"\n >\n </svg:circle>\n</ng-container>\n\n\n\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1585
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AreaSeriesComponent, decorators: [{
|
|
1699
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: AreaSeriesComponent, decorators: [{
|
|
1586
1700
|
type: Component,
|
|
1587
1701
|
args: [{ selector: 'svg:svg[teta-area-series]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<svg:defs *ngIf=\"series?.fillType === fillType.gradient\">\n <svg:linearGradient [id]=\"'gradient-fill-' + id\" gradientUnits=\"userSpaceOnUse\"\n x1=\"0%\"\n [attr.y1]=\"config?.inverted || series?.fillDirection === fillDirection.y ? '0%' : '100%'\"\n [attr.x2]=\"config?.inverted || series?.fillDirection === fillDirection.y ? '100%' : '0%'\"\n y2=\"0%\">\n <svg:stop offset=\"0%\" [attr.stop-color]=\"series.color\" stop-opacity=\"0\"></svg:stop>\n <svg:stop offset=\"5%\" [attr.stop-color]=\"series.color\" stop-opacity=\"0.1\"></svg:stop>\n <svg:stop offset=\"20%\" [attr.stop-color]=\"series.color\" stop-opacity=\"0.2\"></svg:stop>\n <svg:stop offset=\"60%\" [attr.stop-color]=\"series.color\" stop-opacity=\"0.5\"></svg:stop>\n <svg:stop offset=\"100%\" [attr.stop-color]=\"series.color\" stop-opacity=\"0.8\"></svg:stop>\n </svg:linearGradient>\n</svg:defs>\n<svg:path\n class=\"area\"\n [attr.d]=\"areaPath | async\"\n [attr.stroke-width]=\"0\"\n [attr.fill-opacity]=\"series.style?.fillOpacity\"\n [attr.fill]=\"series.fillType === fillType.gradient ? 'url(#gradient-fill-'+id+')' : series.style?.fill ?? series.color\">\n</svg:path>\n<svg:path\n class=\"area\"\n fill=\"none\"\n [attr.d]=\"path | async\"\n [attr.stroke]=\"series.color\"\n [attr.stroke-dasharray]=\"series.style?.strokeDasharray\"\n [attr.stroke-width]=\"series.style?.strokeWidth\">\n</svg:path>\n<ng-container *ngIf=\"transform | async as t\">\n <svg:circle\n *ngIf=\"t?.x !=null && t?.y !=null\"\n r=\"3\"\n [attr.fill]=\"series.color\"\n [attr.transform]=\"'translate('+ t.x +', '+ t.y +')'\"\n >\n </svg:circle>\n</ng-container>\n<ng-container *ngIf=\"markers as draggablePoints\">\n <svg:circle\n class=\"marker\"\n *ngFor=\"let point of draggablePoints\"\n [class.draggable-marker]=\"point?.marker?.draggable\"\n [attr.r]=\"point.marker.style?.radius ?? 5\"\n [attr.fill]=\"point.marker.style?.fill ?? 'transparent'\"\n [attr.stroke]=\"point.marker.style?.stroke ?? 'none'\"\n [attr.stroke-width]=\"point.marker.style?.strokeWidth\"\n [attr.stroke-dasharray]=\"point.marker.style?.strokeDasharray\"\n [attr.cx]=\"x(point.x)\"\n [attr.cy]=\"y(point.y)\"\n >\n </svg:circle>\n</ng-container>\n\n\n\n" }]
|
|
1588
1702
|
}], ctorParameters: function () { return [{ type: ChartService }, { type: i0.ChangeDetectorRef }, { type: ScaleService }, { type: ZoomService }, { type: i0.ElementRef }]; } });
|
|
@@ -1596,9 +1710,13 @@ const defaultSeriesTypeMapping = new Map()
|
|
|
1596
1710
|
.set(SeriesType.blockArea, BlockAreaSeriesComponent);
|
|
1597
1711
|
|
|
1598
1712
|
class SeriesHostComponent {
|
|
1713
|
+
viewContainerRef;
|
|
1714
|
+
config;
|
|
1715
|
+
series;
|
|
1716
|
+
_init = false;
|
|
1717
|
+
_componentRef;
|
|
1599
1718
|
constructor(viewContainerRef) {
|
|
1600
1719
|
this.viewContainerRef = viewContainerRef;
|
|
1601
|
-
this._init = false;
|
|
1602
1720
|
}
|
|
1603
1721
|
ngOnInit() {
|
|
1604
1722
|
if (!SeriesBaseComponent.isPrototypeOf(this.series.component)) {
|
|
@@ -1620,10 +1738,10 @@ class SeriesHostComponent {
|
|
|
1620
1738
|
this._componentRef.injector.get(ChangeDetectorRef).detectChanges();
|
|
1621
1739
|
}
|
|
1622
1740
|
}
|
|
1741
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: SeriesHostComponent, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1742
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: SeriesHostComponent, selector: "[teta-series-host]", inputs: { config: "config", series: "series" }, usesOnChanges: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1623
1743
|
}
|
|
1624
|
-
|
|
1625
|
-
SeriesHostComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: SeriesHostComponent, selector: "[teta-series-host]", inputs: { config: "config", series: "series" }, usesOnChanges: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1626
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: SeriesHostComponent, decorators: [{
|
|
1744
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: SeriesHostComponent, decorators: [{
|
|
1627
1745
|
type: Component,
|
|
1628
1746
|
args: [{
|
|
1629
1747
|
selector: '[teta-series-host]',
|
|
@@ -1637,6 +1755,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
1637
1755
|
}] } });
|
|
1638
1756
|
|
|
1639
1757
|
class GridlinesComponent {
|
|
1758
|
+
svc;
|
|
1759
|
+
chartService;
|
|
1760
|
+
size;
|
|
1761
|
+
config;
|
|
1762
|
+
tickYValues;
|
|
1763
|
+
tickXValues;
|
|
1764
|
+
x;
|
|
1765
|
+
y;
|
|
1640
1766
|
constructor(svc, chartService) {
|
|
1641
1767
|
this.svc = svc;
|
|
1642
1768
|
this.chartService = chartService;
|
|
@@ -1656,10 +1782,10 @@ class GridlinesComponent {
|
|
|
1656
1782
|
}
|
|
1657
1783
|
ngAfterViewInit() {
|
|
1658
1784
|
}
|
|
1785
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: GridlinesComponent, deps: [{ token: ScaleService }, { token: ChartService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1786
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: GridlinesComponent, selector: "[teta-gridlines]", inputs: { size: "size" }, ngImport: i0, template: "<ng-container *ngIf=\"{\n xValues: tickXValues | async,\n yValues: tickYValues | async,\n x: x | async,\n y: y | async,\n config: config | async\n} as data\">\n <ng-container *ngIf=\"data.y && data.config.gridLines?.showY !== false\">\n <ng-container *ngFor=\"let tick of data.yValues\">\n <svg:line [attr.x1]=\"0\"\n [attr.y1]=\"data.y(tick) || 1\"\n [attr.x2]=\"size?.width\"\n [attr.y2]=\"data.y(tick) || 1\"></svg:line>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"data.x && data.config.gridLines?.showX !== false\">\n <ng-container *ngFor=\"let tick of data.xValues\">\n <svg:line [attr.x1]=\"data.x(tick) || 1\"\n [attr.y1]=\"0\"\n [attr.x2]=\"data.x(tick) || 1\"\n [attr.y2]=\"size?.height\"></svg:line>\n </ng-container>\n </ng-container>\n\n</ng-container>\n\n\n", styles: [":host{shape-rendering:crispEdges}:host line{stroke:var(--color-text-5)}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1659
1787
|
}
|
|
1660
|
-
|
|
1661
|
-
GridlinesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: GridlinesComponent, selector: "[teta-gridlines]", inputs: { size: "size" }, ngImport: i0, template: "<ng-container *ngIf=\"{\n xValues: tickXValues | async,\n yValues: tickYValues | async,\n x: x | async,\n y: y | async,\n config: config | async\n} as data\">\n <ng-container *ngIf=\"data.y && data.config.gridLines?.showY !== false\">\n <ng-container *ngFor=\"let tick of data.yValues\">\n <svg:line [attr.x1]=\"0\"\n [attr.y1]=\"data.y(tick) || 1\"\n [attr.x2]=\"size?.width\"\n [attr.y2]=\"data.y(tick) || 1\"></svg:line>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"data.x && data.config.gridLines?.showX !== false\">\n <ng-container *ngFor=\"let tick of data.xValues\">\n <svg:line [attr.x1]=\"data.x(tick) || 1\"\n [attr.y1]=\"0\"\n [attr.x2]=\"data.x(tick) || 1\"\n [attr.y2]=\"size?.height\"></svg:line>\n </ng-container>\n </ng-container>\n\n</ng-container>\n\n\n", styles: [":host{shape-rendering:crispEdges}:host line{stroke:var(--color-text-5)}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1662
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: GridlinesComponent, decorators: [{
|
|
1788
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: GridlinesComponent, decorators: [{
|
|
1663
1789
|
type: Component,
|
|
1664
1790
|
args: [{ selector: '[teta-gridlines]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"{\n xValues: tickXValues | async,\n yValues: tickYValues | async,\n x: x | async,\n y: y | async,\n config: config | async\n} as data\">\n <ng-container *ngIf=\"data.y && data.config.gridLines?.showY !== false\">\n <ng-container *ngFor=\"let tick of data.yValues\">\n <svg:line [attr.x1]=\"0\"\n [attr.y1]=\"data.y(tick) || 1\"\n [attr.x2]=\"size?.width\"\n [attr.y2]=\"data.y(tick) || 1\"></svg:line>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"data.x && data.config.gridLines?.showX !== false\">\n <ng-container *ngFor=\"let tick of data.xValues\">\n <svg:line [attr.x1]=\"data.x(tick) || 1\"\n [attr.y1]=\"0\"\n [attr.x2]=\"data.x(tick) || 1\"\n [attr.y2]=\"size?.height\"></svg:line>\n </ng-container>\n </ng-container>\n\n</ng-container>\n\n\n", styles: [":host{shape-rendering:crispEdges}:host line{stroke:var(--color-text-5)}\n"] }]
|
|
1665
1791
|
}], ctorParameters: function () { return [{ type: ScaleService }, { type: ChartService }]; }, propDecorators: { size: [{
|
|
@@ -1667,11 +1793,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
1667
1793
|
}] } });
|
|
1668
1794
|
|
|
1669
1795
|
class XAxisComponent {
|
|
1796
|
+
scaleService;
|
|
1797
|
+
_svc;
|
|
1798
|
+
x;
|
|
1799
|
+
ticks;
|
|
1800
|
+
axis;
|
|
1801
|
+
size;
|
|
1802
|
+
update$ = new BehaviorSubject(null);
|
|
1803
|
+
_alive = true;
|
|
1670
1804
|
constructor(scaleService, _svc) {
|
|
1671
1805
|
this.scaleService = scaleService;
|
|
1672
1806
|
this._svc = _svc;
|
|
1673
|
-
this.update$ = new BehaviorSubject(null);
|
|
1674
|
-
this._alive = true;
|
|
1675
1807
|
this.x = this.scaleService.scales.pipe(map((_) => {
|
|
1676
1808
|
return _.x.get(this.axis.index)?.scale;
|
|
1677
1809
|
}));
|
|
@@ -1694,10 +1826,10 @@ class XAxisComponent {
|
|
|
1694
1826
|
this.update$.next();
|
|
1695
1827
|
}
|
|
1696
1828
|
}
|
|
1829
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: XAxisComponent, deps: [{ token: ScaleService }, { token: ChartService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1830
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: XAxisComponent, selector: "[teta-x-axis]", inputs: { axis: "axis", size: "size" }, usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"{x: x | async, ticks: ticks | async} as data\">\n <svg:g text-anchor=\"middle\" *ngFor=\"let tick of data.ticks\" [attr.transform]=\"'translate('+ data.x(tick) +', 0)'\">\n <text fill=\"var(--color-text-70)\" [attr.dy]=\"axis.options.opposite ? '-0.71em' : '0.71em'\" [attr.y]=\"axis.options.opposite ? 0 : 9\">{{ this.axis.options.tickFormat ? this.axis.options.tickFormat(tick) : this.axis.defaultFormatter()(tick) }}</text>\n <line stroke=\"var(--color-text-30)\" [attr.y2]=\"axis.options.opposite ? -6 : 6\"></line>\n </svg:g>\n\n <svg:g class=\"label-axis font-caption\" [attr.transform]=\"getLabelTransform()\">\n <text fill=\"var(--color-text-70)\" text-anchor=\"middle\" dominant-baseline=\"middle\">{{ axis.options.title }}</text>\n </svg:g>\n</ng-container>\n\n", styles: [":host .tick{stroke:var(--color-text-20)}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1697
1831
|
}
|
|
1698
|
-
|
|
1699
|
-
XAxisComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: XAxisComponent, selector: "[teta-x-axis]", inputs: { axis: "axis", size: "size" }, usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"{x: x | async, ticks: ticks | async} as data\">\n <svg:g text-anchor=\"middle\" *ngFor=\"let tick of data.ticks\" [attr.transform]=\"'translate('+ data.x(tick) +', 0)'\">\n <text fill=\"var(--color-text-70)\" [attr.dy]=\"axis.options.opposite ? '-0.71em' : '0.71em'\" [attr.y]=\"axis.options.opposite ? 0 : 9\">{{ this.axis.options.tickFormat ? this.axis.options.tickFormat(tick) : this.axis.defaultFormatter()(tick) }}</text>\n <line stroke=\"var(--color-text-30)\" [attr.y2]=\"axis.options.opposite ? -6 : 6\"></line>\n </svg:g>\n\n <svg:g class=\"label-axis font-caption\" [attr.transform]=\"getLabelTransform()\">\n <text fill=\"var(--color-text-70)\" text-anchor=\"middle\" dominant-baseline=\"middle\">{{ axis.options.title }}</text>\n </svg:g>\n</ng-container>\n\n", styles: [":host .tick{stroke:var(--color-text-20)}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1700
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: XAxisComponent, decorators: [{
|
|
1832
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: XAxisComponent, decorators: [{
|
|
1701
1833
|
type: Component,
|
|
1702
1834
|
args: [{ selector: '[teta-x-axis]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"{x: x | async, ticks: ticks | async} as data\">\n <svg:g text-anchor=\"middle\" *ngFor=\"let tick of data.ticks\" [attr.transform]=\"'translate('+ data.x(tick) +', 0)'\">\n <text fill=\"var(--color-text-70)\" [attr.dy]=\"axis.options.opposite ? '-0.71em' : '0.71em'\" [attr.y]=\"axis.options.opposite ? 0 : 9\">{{ this.axis.options.tickFormat ? this.axis.options.tickFormat(tick) : this.axis.defaultFormatter()(tick) }}</text>\n <line stroke=\"var(--color-text-30)\" [attr.y2]=\"axis.options.opposite ? -6 : 6\"></line>\n </svg:g>\n\n <svg:g class=\"label-axis font-caption\" [attr.transform]=\"getLabelTransform()\">\n <text fill=\"var(--color-text-70)\" text-anchor=\"middle\" dominant-baseline=\"middle\">{{ axis.options.title }}</text>\n </svg:g>\n</ng-container>\n\n", styles: [":host .tick{stroke:var(--color-text-20)}\n"] }]
|
|
1703
1835
|
}], ctorParameters: function () { return [{ type: ScaleService }, { type: ChartService }]; }, propDecorators: { axis: [{
|
|
@@ -1707,9 +1839,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
1707
1839
|
}] } });
|
|
1708
1840
|
|
|
1709
1841
|
class YAxisComponent {
|
|
1842
|
+
scaleService;
|
|
1843
|
+
y;
|
|
1844
|
+
axis;
|
|
1845
|
+
size;
|
|
1846
|
+
_alive = true;
|
|
1710
1847
|
constructor(scaleService) {
|
|
1711
1848
|
this.scaleService = scaleService;
|
|
1712
|
-
this._alive = true;
|
|
1713
1849
|
this.y = this.scaleService.scales.pipe(map((_) => {
|
|
1714
1850
|
return _.y.get(this.axis.index)?.scale;
|
|
1715
1851
|
}));
|
|
@@ -1725,10 +1861,10 @@ class YAxisComponent {
|
|
|
1725
1861
|
? this.axis.selfSize
|
|
1726
1862
|
: -this.axis.selfSize}, ${this.size.height / 2}) rotate(-90)`;
|
|
1727
1863
|
}
|
|
1864
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: YAxisComponent, deps: [{ token: ScaleService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1865
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: YAxisComponent, selector: "[teta-y-axis]", inputs: { axis: "axis", size: "size" }, ngImport: i0, template: "<ng-container *ngIf=\"y | async as scale\">\n <svg:g [attr.text-anchor]=\"axis.options.opposite ? 'start' : 'end'\" *ngFor=\"let tick of scale.ticks()\" [attr.transform]=\"'translate(0, '+ scale(tick) +')'\">\n <text fill=\"var(--color-text-70)\" dy=\"0.32em\" [attr.x]=\"axis.options.opposite ? 10 : -9\">{{ this.axis.options.tickFormat ? this.axis.options.tickFormat(tick) : this.axis.defaultFormatter()(tick) }}</text>\n <line stroke=\"var(--color-text-30)\" [attr.x2]=\"axis.options.opposite ? 6 : -6\"></line>\n </svg:g>\n\n <svg:g class=\"label-axis font-caption\" [attr.transform]=\"getLabelTransform()\">\n <text [attr.dy]=\"axis.options.opposite ? '-4px' : '4px'\" text-anchor=\"middle\" [attr.dominant-baseline]=\"axis.options.opposite ? 'auto' : 'hanging'\">{{ axis.options.title }}</text>\n </svg:g>\n</ng-container>\n\n", styles: [":host{shape-rendering:crispEdges}:host .label-axis{fill:var(--color-text-70)}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1728
1866
|
}
|
|
1729
|
-
|
|
1730
|
-
YAxisComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: YAxisComponent, selector: "[teta-y-axis]", inputs: { axis: "axis", size: "size" }, ngImport: i0, template: "<ng-container *ngIf=\"y | async as scale\">\n <svg:g [attr.text-anchor]=\"axis.options.opposite ? 'start' : 'end'\" *ngFor=\"let tick of scale.ticks()\" [attr.transform]=\"'translate(0, '+ scale(tick) +')'\">\n <text fill=\"var(--color-text-70)\" dy=\"0.32em\" [attr.x]=\"axis.options.opposite ? 10 : -9\">{{ this.axis.options.tickFormat ? this.axis.options.tickFormat(tick) : this.axis.defaultFormatter()(tick) }}</text>\n <line stroke=\"var(--color-text-30)\" [attr.x2]=\"axis.options.opposite ? 6 : -6\"></line>\n </svg:g>\n\n <svg:g class=\"label-axis font-caption\" [attr.transform]=\"getLabelTransform()\">\n <text [attr.dy]=\"axis.options.opposite ? '-4px' : '4px'\" text-anchor=\"middle\" [attr.dominant-baseline]=\"axis.options.opposite ? 'auto' : 'hanging'\">{{ axis.options.title }}</text>\n </svg:g>\n</ng-container>\n\n", styles: [":host{shape-rendering:crispEdges}:host .label-axis{fill:var(--color-text-70)}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1731
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: YAxisComponent, decorators: [{
|
|
1867
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: YAxisComponent, decorators: [{
|
|
1732
1868
|
type: Component,
|
|
1733
1869
|
args: [{ selector: '[teta-y-axis]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"y | async as scale\">\n <svg:g [attr.text-anchor]=\"axis.options.opposite ? 'start' : 'end'\" *ngFor=\"let tick of scale.ticks()\" [attr.transform]=\"'translate(0, '+ scale(tick) +')'\">\n <text fill=\"var(--color-text-70)\" dy=\"0.32em\" [attr.x]=\"axis.options.opposite ? 10 : -9\">{{ this.axis.options.tickFormat ? this.axis.options.tickFormat(tick) : this.axis.defaultFormatter()(tick) }}</text>\n <line stroke=\"var(--color-text-30)\" [attr.x2]=\"axis.options.opposite ? 6 : -6\"></line>\n </svg:g>\n\n <svg:g class=\"label-axis font-caption\" [attr.transform]=\"getLabelTransform()\">\n <text [attr.dy]=\"axis.options.opposite ? '-4px' : '4px'\" text-anchor=\"middle\" [attr.dominant-baseline]=\"axis.options.opposite ? 'auto' : 'hanging'\">{{ axis.options.title }}</text>\n </svg:g>\n</ng-container>\n\n", styles: [":host{shape-rendering:crispEdges}:host .label-axis{fill:var(--color-text-70)}\n"] }]
|
|
1734
1870
|
}], ctorParameters: function () { return [{ type: ScaleService }]; }, propDecorators: { axis: [{
|
|
@@ -1738,13 +1874,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
1738
1874
|
}] } });
|
|
1739
1875
|
|
|
1740
1876
|
class PlotlineComponent {
|
|
1877
|
+
cdr;
|
|
1878
|
+
zoomService;
|
|
1879
|
+
scaleService;
|
|
1880
|
+
chartService;
|
|
1881
|
+
element;
|
|
1882
|
+
plotLine;
|
|
1883
|
+
size;
|
|
1884
|
+
axis;
|
|
1885
|
+
scale;
|
|
1886
|
+
orientation = AxisOrientation;
|
|
1887
|
+
dragElements;
|
|
1888
|
+
_domain;
|
|
1741
1889
|
constructor(cdr, zoomService, scaleService, chartService, element) {
|
|
1742
1890
|
this.cdr = cdr;
|
|
1743
1891
|
this.zoomService = zoomService;
|
|
1744
1892
|
this.scaleService = scaleService;
|
|
1745
1893
|
this.chartService = chartService;
|
|
1746
1894
|
this.element = element;
|
|
1747
|
-
this.orientation = AxisOrientation;
|
|
1748
1895
|
}
|
|
1749
1896
|
ngOnInit() {
|
|
1750
1897
|
this._domain = this.scale.domain();
|
|
@@ -1800,10 +1947,10 @@ class PlotlineComponent {
|
|
|
1800
1947
|
get width() {
|
|
1801
1948
|
return this.size.width;
|
|
1802
1949
|
}
|
|
1950
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: PlotlineComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: ZoomService }, { token: ScaleService }, { token: ChartService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1951
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: PlotlineComponent, selector: "[teta-plot-line]", inputs: { plotLine: "plotLine", size: "size", axis: "axis", scale: "scale" }, ngImport: i0, template: "<svg:line class=\"plotline\"\n [attr.stroke]=\"plotLine.style?.stroke || 'red'\"\n [attr.stroke-width]=\"plotLine.style?.strokeWidth || 4\"\n [attr.stroke-dasharray]=\"plotLine.style?.strokeDasharray\"\n [attr.x1]=\"axis.orientation === orientation.x ? value : 0\"\n [attr.x2]=\"axis.orientation === orientation.x ? value : width\"\n [attr.y1]=\"axis.orientation === orientation.x ? 0 : value\"\n [attr.y2]=\"axis.orientation === orientation.x ? height : value\">\n</svg:line>\n\n\n<svg:text\n *ngIf=\"axis.orientation === orientation.x\"\n text-anchor=\"middle\"\n dominant-baseline=\"central\"\n class=\"label font-title-2 fill-text-70\"\n [attr.x]=\"value\"\n dy=\"-2em\"\n [attr.transform]=\"'rotate(-90, '+ value +',' + height / 2 + ')'\"\n [attr.y]=\"height / 2\">{{plotLine.label}}\n</svg:text>\n\n<svg:text\n *ngIf=\"axis.orientation === orientation.y\"\n text-anchor=\"middle\"\n class=\"label font-title-2 fill-text-70\"\n dominant-baseline=\"central\"\n [attr.x]=\"value\"\n [attr.y]=\"width / 2\">{{plotLine.label}}\n</svg:text>\n\n<svg:line class=\"grabber\"\n\n [class.x-grabber]=\"axis.orientation === orientation.x\"\n [class.y-grabber]=\"axis.orientation === orientation.y\"\n [attr.stroke]=\"'red'\"\n [attr.stroke-width]=\"8\"\n opacity=\"0\"\n [attr.x1]=\"axis.orientation === orientation.x ? value : 0\"\n [attr.x2]=\"axis.orientation === orientation.x ? value : width\"\n [attr.y1]=\"axis.orientation === orientation.x ? 0 : value\"\n [attr.y2]=\"axis.orientation === orientation.x ? height : value\">\n</svg:line>\n", styles: [":host .x-grabber{cursor:col-resize}:host .y-grabber{cursor:row-resize}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1803
1952
|
}
|
|
1804
|
-
|
|
1805
|
-
PlotlineComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: PlotlineComponent, selector: "[teta-plot-line]", inputs: { plotLine: "plotLine", size: "size", axis: "axis", scale: "scale" }, ngImport: i0, template: "<svg:line class=\"plotline\"\n [attr.stroke]=\"plotLine.style?.stroke || 'red'\"\n [attr.stroke-width]=\"plotLine.style?.strokeWidth || 4\"\n [attr.stroke-dasharray]=\"plotLine.style?.strokeDasharray\"\n [attr.x1]=\"axis.orientation === orientation.x ? value : 0\"\n [attr.x2]=\"axis.orientation === orientation.x ? value : width\"\n [attr.y1]=\"axis.orientation === orientation.x ? 0 : value\"\n [attr.y2]=\"axis.orientation === orientation.x ? height : value\">\n</svg:line>\n\n\n<svg:text\n *ngIf=\"axis.orientation === orientation.x\"\n text-anchor=\"middle\"\n dominant-baseline=\"central\"\n class=\"label font-title-2 fill-text-70\"\n [attr.x]=\"value\"\n dy=\"-2em\"\n [attr.transform]=\"'rotate(-90, '+ value +',' + height / 2 + ')'\"\n [attr.y]=\"height / 2\">{{plotLine.label}}\n</svg:text>\n\n<svg:text\n *ngIf=\"axis.orientation === orientation.y\"\n text-anchor=\"middle\"\n class=\"label font-title-2 fill-text-70\"\n dominant-baseline=\"central\"\n [attr.x]=\"value\"\n [attr.y]=\"width / 2\">{{plotLine.label}}\n</svg:text>\n\n<svg:line class=\"grabber\"\n\n [class.x-grabber]=\"axis.orientation === orientation.x\"\n [class.y-grabber]=\"axis.orientation === orientation.y\"\n [attr.stroke]=\"'red'\"\n [attr.stroke-width]=\"8\"\n opacity=\"0\"\n [attr.x1]=\"axis.orientation === orientation.x ? value : 0\"\n [attr.x2]=\"axis.orientation === orientation.x ? value : width\"\n [attr.y1]=\"axis.orientation === orientation.x ? 0 : value\"\n [attr.y2]=\"axis.orientation === orientation.x ? height : value\">\n</svg:line>\n", styles: [":host .x-grabber{cursor:col-resize}:host .y-grabber{cursor:row-resize}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1806
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PlotlineComponent, decorators: [{
|
|
1953
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: PlotlineComponent, decorators: [{
|
|
1807
1954
|
type: Component,
|
|
1808
1955
|
args: [{ selector: '[teta-plot-line]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<svg:line class=\"plotline\"\n [attr.stroke]=\"plotLine.style?.stroke || 'red'\"\n [attr.stroke-width]=\"plotLine.style?.strokeWidth || 4\"\n [attr.stroke-dasharray]=\"plotLine.style?.strokeDasharray\"\n [attr.x1]=\"axis.orientation === orientation.x ? value : 0\"\n [attr.x2]=\"axis.orientation === orientation.x ? value : width\"\n [attr.y1]=\"axis.orientation === orientation.x ? 0 : value\"\n [attr.y2]=\"axis.orientation === orientation.x ? height : value\">\n</svg:line>\n\n\n<svg:text\n *ngIf=\"axis.orientation === orientation.x\"\n text-anchor=\"middle\"\n dominant-baseline=\"central\"\n class=\"label font-title-2 fill-text-70\"\n [attr.x]=\"value\"\n dy=\"-2em\"\n [attr.transform]=\"'rotate(-90, '+ value +',' + height / 2 + ')'\"\n [attr.y]=\"height / 2\">{{plotLine.label}}\n</svg:text>\n\n<svg:text\n *ngIf=\"axis.orientation === orientation.y\"\n text-anchor=\"middle\"\n class=\"label font-title-2 fill-text-70\"\n dominant-baseline=\"central\"\n [attr.x]=\"value\"\n [attr.y]=\"width / 2\">{{plotLine.label}}\n</svg:text>\n\n<svg:line class=\"grabber\"\n\n [class.x-grabber]=\"axis.orientation === orientation.x\"\n [class.y-grabber]=\"axis.orientation === orientation.y\"\n [attr.stroke]=\"'red'\"\n [attr.stroke-width]=\"8\"\n opacity=\"0\"\n [attr.x1]=\"axis.orientation === orientation.x ? value : 0\"\n [attr.x2]=\"axis.orientation === orientation.x ? value : width\"\n [attr.y1]=\"axis.orientation === orientation.x ? 0 : value\"\n [attr.y2]=\"axis.orientation === orientation.x ? height : value\">\n</svg:line>\n", styles: [":host .x-grabber{cursor:col-resize}:host .y-grabber{cursor:row-resize}\n"] }]
|
|
1809
1956
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: ZoomService }, { type: ScaleService }, { type: ChartService }, { type: i0.ElementRef }]; }, propDecorators: { plotLine: [{
|
|
@@ -1817,22 +1964,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
1817
1964
|
}] } });
|
|
1818
1965
|
|
|
1819
1966
|
class PlotBandComponent {
|
|
1967
|
+
scaleService;
|
|
1968
|
+
zoomService;
|
|
1969
|
+
chartService;
|
|
1970
|
+
cdr;
|
|
1971
|
+
element;
|
|
1972
|
+
plotBand;
|
|
1973
|
+
axis;
|
|
1974
|
+
scale;
|
|
1975
|
+
size;
|
|
1976
|
+
orientation = AxisOrientation;
|
|
1977
|
+
resizeElements;
|
|
1978
|
+
dragElements;
|
|
1820
1979
|
constructor(scaleService, zoomService, chartService, cdr, element) {
|
|
1821
1980
|
this.scaleService = scaleService;
|
|
1822
1981
|
this.zoomService = zoomService;
|
|
1823
1982
|
this.chartService = chartService;
|
|
1824
1983
|
this.cdr = cdr;
|
|
1825
1984
|
this.element = element;
|
|
1826
|
-
this.orientation = AxisOrientation;
|
|
1827
|
-
this.getTextPosition = () => {
|
|
1828
|
-
let [min, max] = this.scale.domain();
|
|
1829
|
-
min = min instanceof Date ? min.getTime() : min;
|
|
1830
|
-
max = max instanceof Date ? max.getTime() : max;
|
|
1831
|
-
const from = this.plotBand.from instanceof Date ? this.plotBand.from.getTime() : this.plotBand.from;
|
|
1832
|
-
const to = this.plotBand.to instanceof Date ? this.plotBand.to.getTime() : this.plotBand.to;
|
|
1833
|
-
const position = ((from <= min ? min : from) + (to >= max ? max : to)) / 2;
|
|
1834
|
-
return this.scale(position);
|
|
1835
|
-
};
|
|
1836
1985
|
}
|
|
1837
1986
|
click(event) {
|
|
1838
1987
|
this.emit({
|
|
@@ -1943,16 +2092,25 @@ class PlotBandComponent {
|
|
|
1943
2092
|
get bandSize() {
|
|
1944
2093
|
return Math.abs(this.scale(this.plotBand.to) - this.scale(this.plotBand.from));
|
|
1945
2094
|
}
|
|
2095
|
+
getTextPosition = () => {
|
|
2096
|
+
let [min, max] = this.scale.domain();
|
|
2097
|
+
min = min instanceof Date ? min.getTime() : min;
|
|
2098
|
+
max = max instanceof Date ? max.getTime() : max;
|
|
2099
|
+
const from = this.plotBand.from instanceof Date ? this.plotBand.from.getTime() : this.plotBand.from;
|
|
2100
|
+
const to = this.plotBand.to instanceof Date ? this.plotBand.to.getTime() : this.plotBand.to;
|
|
2101
|
+
const position = ((from <= min ? min : from) + (to >= max ? max : to)) / 2;
|
|
2102
|
+
return this.scale(position);
|
|
2103
|
+
};
|
|
1946
2104
|
getFill(d) {
|
|
1947
2105
|
if (d.style?.plotBand?.patternImage) {
|
|
1948
2106
|
return `url(#${d.style.plotBand?.patternImage})`;
|
|
1949
2107
|
}
|
|
1950
2108
|
return d.style.plotBand?.fill;
|
|
1951
2109
|
}
|
|
2110
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: PlotBandComponent, deps: [{ token: ScaleService }, { token: ZoomService }, { token: ChartService }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
2111
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: PlotBandComponent, selector: "[teta-plot-band]", inputs: { plotBand: "plotBand", axis: "axis", scale: "scale", size: "size" }, host: { listeners: { "click": "click($event)", "contextmenu": "contextMenu($event)" } }, ngImport: i0, template: "<svg:rect\n class=\"plotband\" xmlns:svg=\"http://www.w3.org/1999/html\"\n [class.draggable]=\"plotBand?.draggable === true\"\n [attr.fill]=\"getFill(plotBand)\"\n [attr.opacity]=\"plotBand.style?.plotBand?.opacity\"\n [attr.height]=\"axis.orientation === orientation.x ? height : bandSize\"\n [attr.width]=\"axis.orientation === orientation.x ? bandSize : width\"\n [attr.y]=\"axis.orientation === orientation.y ? from : null\"\n [attr.x]=\"axis.orientation === orientation.x ? from : null\">\n</svg:rect>\n\n<svg:text\n *ngIf=\"axis.orientation === orientation.x\"\n text-anchor=\"middle\"\n dominant-baseline=\"middle\"\n class=\"label font-caption fill-text-90\"\n [attr.x]=\"getTextPosition()\"\n [attr.transform]=\"'rotate(-90, '+ getTextPosition() +',' + height / 2 + ')'\"\n [attr.y]=\"height / 2\">{{plotBand.label}}\n</svg:text>\n\n<svg:text\n *ngIf=\"axis.orientation === orientation.y\"\n text-anchor=\"middle\"\n class=\"label font-caption fill-text-90\"\n dominant-baseline=\"central\"\n [attr.x]=\"getTextPosition()\"\n [attr.y]=\"width / 2\">{{plotBand.label}}\n</svg:text>\n\n<svg:line class=\"display-grabber\"\n *ngIf=\"plotBand.showGrabbers && plotBand.resizable\"\n [attr.stroke]=\"plotBand.style?.grabbers?.stroke || 'var(--color-text-50)'\"\n [attr.stroke-width]=\"plotBand.style?.grabbers?.strokeWidth || 4\"\n [attr.stroke-dasharray]=\"plotBand.style?.grabbers?.strokeDasharray\"\n [attr.x1]=\"axis.orientation === orientation.x ? from : 0\"\n [attr.x2]=\"axis.orientation === orientation.x ? from : width\"\n [attr.data-grabber]=\"'from'\"\n [attr.y1]=\"axis.orientation === orientation.x ? 0 : from\"\n [attr.y2]=\"axis.orientation === orientation.x ? height : from\">\n</svg:line>\n\n<svg:line class=\"display-grabber\"\n *ngIf=\"plotBand.showGrabbers && plotBand.resizable\"\n [attr.stroke]=\"plotBand.style?.grabbers?.stroke || 'var(--color-text-50)'\"\n [attr.stroke-width]=\"plotBand.style?.grabbers?.strokeWidth || 4\"\n [attr.stroke-dasharray]=\"plotBand.style?.grabbers?.strokeDasharray\"\n [attr.x1]=\"axis.orientation === orientation.x ? to : 0\"\n [attr.x2]=\"axis.orientation === orientation.x ? to : width\"\n [attr.data-grabber]=\"'to'\"\n [attr.y1]=\"axis.orientation === orientation.x ? 0 : to\"\n [attr.y2]=\"axis.orientation === orientation.x ? height : to\">\n</svg:line>\n\n<svg:line class=\"grabber\"\n *ngIf=\"plotBand.resizable\"\n [class.x-grabber]=\"axis.orientation === orientation.x\"\n [class.y-grabber]=\"axis.orientation === orientation.y\"\n [class.resizeable]=\"plotBand?.resizable\"\n [attr.stroke]=\"plotBand.style?.grabbers?.stroke || 'var(--color-text-50)'\"\n [attr.stroke-width]=\"8\"\n [style.transform]=\"axis.orientation === orientation.x ? 'translateX(2px)' : 'translateY(2px)'\"\n [attr.x1]=\"axis.orientation === orientation.x ? from : 0\"\n [attr.x2]=\"axis.orientation === orientation.x ? from : width\"\n [attr.data-grabber]=\"'from'\"\n [attr.y1]=\"axis.orientation === orientation.x ? 0 : from\"\n [attr.y2]=\"axis.orientation === orientation.x ? height : from\">\n</svg:line>\n<svg:line class=\"grabber\"\n *ngIf=\"plotBand.resizable\"\n [class.x-grabber]=\"axis.orientation === orientation.x\"\n [class.y-grabber]=\"axis.orientation === orientation.y\"\n [class.resizeable]=\"plotBand?.resizable\"\n [attr.stroke]=\"plotBand.style?.grabbers?.stroke || 'var(--color-text-50)'\"\n [attr.stroke-width]=\"8\"\n [style.transform]=\"axis.orientation === orientation.x ? 'translateX(-2px)' : 'translateY(-2px)'\"\n [attr.x1]=\"axis.orientation === orientation.x ? to : 0\"\n [attr.x2]=\"axis.orientation === orientation.x ? to : width\"\n [attr.data-grabber]=\"'to'\"\n [attr.y1]=\"axis.orientation === orientation.x ? 0 : to\"\n [attr.y2]=\"axis.orientation === orientation.x ? height : to\">\n</svg:line>\n\n\n", styles: [":host .draggable rect:hover{cursor:grab}:host .draggable rect:active{cursor:grabbing}:host .x-grabber.resizeable{cursor:col-resize}:host .y-grabber.resizeable{cursor:row-resize}:host:hover .grabber{opacity:.1}.grabber{opacity:0}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1952
2112
|
}
|
|
1953
|
-
|
|
1954
|
-
PlotBandComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: PlotBandComponent, selector: "[teta-plot-band]", inputs: { plotBand: "plotBand", axis: "axis", scale: "scale", size: "size" }, host: { listeners: { "click": "click($event)", "contextmenu": "contextMenu($event)" } }, ngImport: i0, template: "<svg:rect\n class=\"plotband\" xmlns:svg=\"http://www.w3.org/1999/html\"\n [class.draggable]=\"plotBand?.draggable === true\"\n [attr.fill]=\"getFill(plotBand)\"\n [attr.opacity]=\"plotBand.style?.plotBand?.opacity\"\n [attr.height]=\"axis.orientation === orientation.x ? height : bandSize\"\n [attr.width]=\"axis.orientation === orientation.x ? bandSize : width\"\n [attr.y]=\"axis.orientation === orientation.y ? from : null\"\n [attr.x]=\"axis.orientation === orientation.x ? from : null\">\n</svg:rect>\n\n<svg:text\n *ngIf=\"axis.orientation === orientation.x\"\n text-anchor=\"middle\"\n dominant-baseline=\"middle\"\n class=\"label font-caption fill-text-90\"\n [attr.x]=\"getTextPosition()\"\n [attr.transform]=\"'rotate(-90, '+ getTextPosition() +',' + height / 2 + ')'\"\n [attr.y]=\"height / 2\">{{plotBand.label}}\n</svg:text>\n\n<svg:text\n *ngIf=\"axis.orientation === orientation.y\"\n text-anchor=\"middle\"\n class=\"label font-caption fill-text-90\"\n dominant-baseline=\"central\"\n [attr.x]=\"getTextPosition()\"\n [attr.y]=\"width / 2\">{{plotBand.label}}\n</svg:text>\n\n<svg:line class=\"display-grabber\"\n *ngIf=\"plotBand.showGrabbers && plotBand.resizable\"\n [attr.stroke]=\"plotBand.style?.grabbers?.stroke || 'var(--color-text-50)'\"\n [attr.stroke-width]=\"plotBand.style?.grabbers?.strokeWidth || 4\"\n [attr.stroke-dasharray]=\"plotBand.style?.grabbers?.strokeDasharray\"\n [attr.x1]=\"axis.orientation === orientation.x ? from : 0\"\n [attr.x2]=\"axis.orientation === orientation.x ? from : width\"\n [attr.data-grabber]=\"'from'\"\n [attr.y1]=\"axis.orientation === orientation.x ? 0 : from\"\n [attr.y2]=\"axis.orientation === orientation.x ? height : from\">\n</svg:line>\n\n<svg:line class=\"display-grabber\"\n *ngIf=\"plotBand.showGrabbers && plotBand.resizable\"\n [attr.stroke]=\"plotBand.style?.grabbers?.stroke || 'var(--color-text-50)'\"\n [attr.stroke-width]=\"plotBand.style?.grabbers?.strokeWidth || 4\"\n [attr.stroke-dasharray]=\"plotBand.style?.grabbers?.strokeDasharray\"\n [attr.x1]=\"axis.orientation === orientation.x ? to : 0\"\n [attr.x2]=\"axis.orientation === orientation.x ? to : width\"\n [attr.data-grabber]=\"'to'\"\n [attr.y1]=\"axis.orientation === orientation.x ? 0 : to\"\n [attr.y2]=\"axis.orientation === orientation.x ? height : to\">\n</svg:line>\n\n<svg:line class=\"grabber\"\n *ngIf=\"plotBand.resizable\"\n [class.x-grabber]=\"axis.orientation === orientation.x\"\n [class.y-grabber]=\"axis.orientation === orientation.y\"\n [class.resizeable]=\"plotBand?.resizable\"\n [attr.stroke]=\"plotBand.style?.grabbers?.stroke || 'var(--color-text-50)'\"\n [attr.stroke-width]=\"8\"\n [style.transform]=\"axis.orientation === orientation.x ? 'translateX(2px)' : 'translateY(2px)'\"\n [attr.x1]=\"axis.orientation === orientation.x ? from : 0\"\n [attr.x2]=\"axis.orientation === orientation.x ? from : width\"\n [attr.data-grabber]=\"'from'\"\n [attr.y1]=\"axis.orientation === orientation.x ? 0 : from\"\n [attr.y2]=\"axis.orientation === orientation.x ? height : from\">\n</svg:line>\n<svg:line class=\"grabber\"\n *ngIf=\"plotBand.resizable\"\n [class.x-grabber]=\"axis.orientation === orientation.x\"\n [class.y-grabber]=\"axis.orientation === orientation.y\"\n [class.resizeable]=\"plotBand?.resizable\"\n [attr.stroke]=\"plotBand.style?.grabbers?.stroke || 'var(--color-text-50)'\"\n [attr.stroke-width]=\"8\"\n [style.transform]=\"axis.orientation === orientation.x ? 'translateX(-2px)' : 'translateY(-2px)'\"\n [attr.x1]=\"axis.orientation === orientation.x ? to : 0\"\n [attr.x2]=\"axis.orientation === orientation.x ? to : width\"\n [attr.data-grabber]=\"'to'\"\n [attr.y1]=\"axis.orientation === orientation.x ? 0 : to\"\n [attr.y2]=\"axis.orientation === orientation.x ? height : to\">\n</svg:line>\n\n\n", styles: [":host .draggable rect:hover{cursor:grab}:host .draggable rect:active{cursor:grabbing}:host .x-grabber.resizeable{cursor:col-resize}:host .y-grabber.resizeable{cursor:row-resize}:host:hover .grabber{opacity:.1}.grabber{opacity:0}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1955
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: PlotBandComponent, decorators: [{
|
|
2113
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: PlotBandComponent, decorators: [{
|
|
1956
2114
|
type: Component,
|
|
1957
2115
|
args: [{ selector: '[teta-plot-band]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<svg:rect\n class=\"plotband\" xmlns:svg=\"http://www.w3.org/1999/html\"\n [class.draggable]=\"plotBand?.draggable === true\"\n [attr.fill]=\"getFill(plotBand)\"\n [attr.opacity]=\"plotBand.style?.plotBand?.opacity\"\n [attr.height]=\"axis.orientation === orientation.x ? height : bandSize\"\n [attr.width]=\"axis.orientation === orientation.x ? bandSize : width\"\n [attr.y]=\"axis.orientation === orientation.y ? from : null\"\n [attr.x]=\"axis.orientation === orientation.x ? from : null\">\n</svg:rect>\n\n<svg:text\n *ngIf=\"axis.orientation === orientation.x\"\n text-anchor=\"middle\"\n dominant-baseline=\"middle\"\n class=\"label font-caption fill-text-90\"\n [attr.x]=\"getTextPosition()\"\n [attr.transform]=\"'rotate(-90, '+ getTextPosition() +',' + height / 2 + ')'\"\n [attr.y]=\"height / 2\">{{plotBand.label}}\n</svg:text>\n\n<svg:text\n *ngIf=\"axis.orientation === orientation.y\"\n text-anchor=\"middle\"\n class=\"label font-caption fill-text-90\"\n dominant-baseline=\"central\"\n [attr.x]=\"getTextPosition()\"\n [attr.y]=\"width / 2\">{{plotBand.label}}\n</svg:text>\n\n<svg:line class=\"display-grabber\"\n *ngIf=\"plotBand.showGrabbers && plotBand.resizable\"\n [attr.stroke]=\"plotBand.style?.grabbers?.stroke || 'var(--color-text-50)'\"\n [attr.stroke-width]=\"plotBand.style?.grabbers?.strokeWidth || 4\"\n [attr.stroke-dasharray]=\"plotBand.style?.grabbers?.strokeDasharray\"\n [attr.x1]=\"axis.orientation === orientation.x ? from : 0\"\n [attr.x2]=\"axis.orientation === orientation.x ? from : width\"\n [attr.data-grabber]=\"'from'\"\n [attr.y1]=\"axis.orientation === orientation.x ? 0 : from\"\n [attr.y2]=\"axis.orientation === orientation.x ? height : from\">\n</svg:line>\n\n<svg:line class=\"display-grabber\"\n *ngIf=\"plotBand.showGrabbers && plotBand.resizable\"\n [attr.stroke]=\"plotBand.style?.grabbers?.stroke || 'var(--color-text-50)'\"\n [attr.stroke-width]=\"plotBand.style?.grabbers?.strokeWidth || 4\"\n [attr.stroke-dasharray]=\"plotBand.style?.grabbers?.strokeDasharray\"\n [attr.x1]=\"axis.orientation === orientation.x ? to : 0\"\n [attr.x2]=\"axis.orientation === orientation.x ? to : width\"\n [attr.data-grabber]=\"'to'\"\n [attr.y1]=\"axis.orientation === orientation.x ? 0 : to\"\n [attr.y2]=\"axis.orientation === orientation.x ? height : to\">\n</svg:line>\n\n<svg:line class=\"grabber\"\n *ngIf=\"plotBand.resizable\"\n [class.x-grabber]=\"axis.orientation === orientation.x\"\n [class.y-grabber]=\"axis.orientation === orientation.y\"\n [class.resizeable]=\"plotBand?.resizable\"\n [attr.stroke]=\"plotBand.style?.grabbers?.stroke || 'var(--color-text-50)'\"\n [attr.stroke-width]=\"8\"\n [style.transform]=\"axis.orientation === orientation.x ? 'translateX(2px)' : 'translateY(2px)'\"\n [attr.x1]=\"axis.orientation === orientation.x ? from : 0\"\n [attr.x2]=\"axis.orientation === orientation.x ? from : width\"\n [attr.data-grabber]=\"'from'\"\n [attr.y1]=\"axis.orientation === orientation.x ? 0 : from\"\n [attr.y2]=\"axis.orientation === orientation.x ? height : from\">\n</svg:line>\n<svg:line class=\"grabber\"\n *ngIf=\"plotBand.resizable\"\n [class.x-grabber]=\"axis.orientation === orientation.x\"\n [class.y-grabber]=\"axis.orientation === orientation.y\"\n [class.resizeable]=\"plotBand?.resizable\"\n [attr.stroke]=\"plotBand.style?.grabbers?.stroke || 'var(--color-text-50)'\"\n [attr.stroke-width]=\"8\"\n [style.transform]=\"axis.orientation === orientation.x ? 'translateX(-2px)' : 'translateY(-2px)'\"\n [attr.x1]=\"axis.orientation === orientation.x ? to : 0\"\n [attr.x2]=\"axis.orientation === orientation.x ? to : width\"\n [attr.data-grabber]=\"'to'\"\n [attr.y1]=\"axis.orientation === orientation.x ? 0 : to\"\n [attr.y2]=\"axis.orientation === orientation.x ? height : to\">\n</svg:line>\n\n\n", styles: [":host .draggable rect:hover{cursor:grab}:host .draggable rect:active{cursor:grabbing}:host .x-grabber.resizeable{cursor:col-resize}:host .y-grabber.resizeable{cursor:row-resize}:host:hover .grabber{opacity:.1}.grabber{opacity:0}\n"] }]
|
|
1958
2116
|
}], ctorParameters: function () { return [{ type: ScaleService }, { type: ZoomService }, { type: ChartService }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }]; }, propDecorators: { plotBand: [{
|
|
@@ -1972,6 +2130,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
1972
2130
|
}] } });
|
|
1973
2131
|
|
|
1974
2132
|
class TooltipComponent {
|
|
2133
|
+
svc;
|
|
2134
|
+
cdr;
|
|
2135
|
+
zoomService;
|
|
2136
|
+
sanitizer;
|
|
2137
|
+
_zone;
|
|
2138
|
+
_elementRef;
|
|
2139
|
+
size;
|
|
2140
|
+
config;
|
|
2141
|
+
tooltip;
|
|
2142
|
+
position;
|
|
2143
|
+
displayTooltips;
|
|
2144
|
+
display;
|
|
2145
|
+
tooltips;
|
|
1975
2146
|
constructor(svc, cdr, zoomService, sanitizer, _zone, _elementRef) {
|
|
1976
2147
|
this.svc = svc;
|
|
1977
2148
|
this.cdr = cdr;
|
|
@@ -2041,12 +2212,12 @@ class TooltipComponent {
|
|
|
2041
2212
|
const format = d3.format(',.5~r');
|
|
2042
2213
|
return format(input);
|
|
2043
2214
|
}
|
|
2215
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: TooltipComponent, deps: [{ token: ChartService }, { token: i0.ChangeDetectorRef }, { token: ZoomService }, { token: i3.DomSanitizer }, { token: i0.NgZone }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
2216
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: TooltipComponent, selector: "teta-tooltip", inputs: { size: "size", config: "config" }, viewQueries: [{ propertyName: "tooltip", first: true, predicate: ["tooltip"], descendants: true, read: ElementRef }], ngImport: i0, template: "<ng-container *tetaLet=\"position | async as p\">\n <ng-container *ngIf=\"tooltips | async as t\">\n <div class=\"chart-tooltip color-text-90 bg-global-bgcard shadow-2\"\n #tooltip\n [style.position]=\"'fixed'\"\n *ngIf=\"t.length > 0\"\n [style.opacity]=\"display | async\"\n [hidden]=\"!p\"\n style=\"pointer-events: none; min-width: 200px;\"\n [style.left.px]=\"p?.left\"\n [style.top.px]=\"p?.top\"\n [style.bottom.px]=\"p?.bottom\"\n [style.right.px]=\"p?.right\"\n >\n <ng-container *ngIf=\"config.tooltip?.template\">\n <ng-container *ngTemplateOutlet=\"config.tooltip.template; context: {$implicit: t}\"></ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"config.tooltip?.format; else default\">\n <div [innerHTML]=\"displayTooltips | async\"></div>\n </ng-container>\n\n <ng-template #default>\n <div *ngIf=\"!config.tooltip?.template\" class=\"padding-2 border-radius-1\">\n <ng-container *ngFor=\"let tooltip of t\">\n <div class=\"display-flex align-center\">\n <span class=\"display-block margin-right-1\" [style.width.px]=\"10\" [style.height.px]=\"2\"\n [style.background-color]=\"tooltip.series?.color\"></span>\n <span class=\"font-title-3\">\n {{ tooltip.series?.name }}\n <span class=\"font-body-3\">\n x: {{ format(tooltip.point?.x) }}\n y: {{ format(tooltip.point?.y) }}\n </span>\n </span>\n </div>\n </ng-container>\n </div>\n </ng-template>\n </div>\n </ng-container>\n</ng-container>\n\n\n\n", styles: [":host{position:absolute;z-index:2}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i5.LetDirective, selector: "[tetaLet]", inputs: ["tetaLet"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2044
2217
|
}
|
|
2045
|
-
|
|
2046
|
-
TooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: TooltipComponent, selector: "teta-tooltip", inputs: { size: "size", config: "config" }, viewQueries: [{ propertyName: "tooltip", first: true, predicate: ["tooltip"], descendants: true, read: ElementRef }], ngImport: i0, template: "<ng-container *tetaLet=\"position | async as p\">\n <ng-container *ngIf=\"tooltips | async as t\">\n <div class=\"chart-tooltip color-text-90 bg-background-50 shadow-2\"\n #tooltip\n [style.position]=\"'fixed'\"\n *ngIf=\"t.length > 0\"\n [style.opacity]=\"display | async\"\n [hidden]=\"!p\"\n style=\"pointer-events: none; min-width: 200px;\"\n [style.left.px]=\"p?.left\"\n [style.top.px]=\"p?.top\"\n [style.bottom.px]=\"p?.bottom\"\n [style.right.px]=\"p?.right\"\n >\n <ng-container *ngIf=\"config.tooltip?.template\">\n <ng-container *ngTemplateOutlet=\"config.tooltip.template; context: {$implicit: t}\"></ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"config.tooltip?.format; else default\">\n <div [innerHTML]=\"displayTooltips | async\"></div>\n </ng-container>\n\n <ng-template #default>\n <div *ngIf=\"!config.tooltip?.template\" class=\"padding-2 border-radius-1\">\n <ng-container *ngFor=\"let tooltip of t\">\n <div class=\"display-flex align-center\">\n <span class=\"display-block margin-right-1\" [style.width.px]=\"10\" [style.height.px]=\"2\"\n [style.background-color]=\"tooltip.series?.color\"></span>\n <span class=\"font-title-3\">\n {{ tooltip.series?.name }}\n <span class=\"font-body-3\">\n x: {{ format(tooltip.point?.x) }}\n y: {{ format(tooltip.point?.y) }}\n </span>\n </span>\n </div>\n </ng-container>\n </div>\n </ng-template>\n </div>\n </ng-container>\n</ng-container>\n\n\n\n", styles: [":host{position:absolute;z-index:2}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i5.LetDirective, selector: "[tetaLet]", inputs: ["tetaLet"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2047
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: TooltipComponent, decorators: [{
|
|
2218
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: TooltipComponent, decorators: [{
|
|
2048
2219
|
type: Component,
|
|
2049
|
-
args: [{ selector: 'teta-tooltip', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *tetaLet=\"position | async as p\">\n <ng-container *ngIf=\"tooltips | async as t\">\n <div class=\"chart-tooltip color-text-90 bg-
|
|
2220
|
+
args: [{ selector: 'teta-tooltip', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *tetaLet=\"position | async as p\">\n <ng-container *ngIf=\"tooltips | async as t\">\n <div class=\"chart-tooltip color-text-90 bg-global-bgcard shadow-2\"\n #tooltip\n [style.position]=\"'fixed'\"\n *ngIf=\"t.length > 0\"\n [style.opacity]=\"display | async\"\n [hidden]=\"!p\"\n style=\"pointer-events: none; min-width: 200px;\"\n [style.left.px]=\"p?.left\"\n [style.top.px]=\"p?.top\"\n [style.bottom.px]=\"p?.bottom\"\n [style.right.px]=\"p?.right\"\n >\n <ng-container *ngIf=\"config.tooltip?.template\">\n <ng-container *ngTemplateOutlet=\"config.tooltip.template; context: {$implicit: t}\"></ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"config.tooltip?.format; else default\">\n <div [innerHTML]=\"displayTooltips | async\"></div>\n </ng-container>\n\n <ng-template #default>\n <div *ngIf=\"!config.tooltip?.template\" class=\"padding-2 border-radius-1\">\n <ng-container *ngFor=\"let tooltip of t\">\n <div class=\"display-flex align-center\">\n <span class=\"display-block margin-right-1\" [style.width.px]=\"10\" [style.height.px]=\"2\"\n [style.background-color]=\"tooltip.series?.color\"></span>\n <span class=\"font-title-3\">\n {{ tooltip.series?.name }}\n <span class=\"font-body-3\">\n x: {{ format(tooltip.point?.x) }}\n y: {{ format(tooltip.point?.y) }}\n </span>\n </span>\n </div>\n </ng-container>\n </div>\n </ng-template>\n </div>\n </ng-container>\n</ng-container>\n\n\n\n", styles: [":host{position:absolute;z-index:2}\n"] }]
|
|
2050
2221
|
}], ctorParameters: function () { return [{ type: ChartService }, { type: i0.ChangeDetectorRef }, { type: ZoomService }, { type: i3.DomSanitizer }, { type: i0.NgZone }, { type: i0.ElementRef }]; }, propDecorators: { size: [{
|
|
2051
2222
|
type: Input
|
|
2052
2223
|
}], config: [{
|
|
@@ -2057,47 +2228,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
2057
2228
|
}] } });
|
|
2058
2229
|
|
|
2059
2230
|
class ZoomableDirective {
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
const origin = this.axis.scale.copy().domain(this.axis.originDomain);
|
|
2073
|
-
if (this.axis.options.scaleType.type === ScaleType.band) {
|
|
2074
|
-
return;
|
|
2075
|
-
}
|
|
2076
|
-
const domain = this.axis.orientation === AxisOrientation.y
|
|
2077
|
-
? event.transform.rescaleY(origin).domain()
|
|
2078
|
-
: event.transform.rescaleX(origin).domain();
|
|
2079
|
-
if (domain[0] === null || domain[0] === undefined
|
|
2080
|
-
|| domain[1] === null || domain[1] === undefined
|
|
2081
|
-
|| Math.abs(domain[0] - domain[1]) < 0.000001) {
|
|
2082
|
-
return;
|
|
2083
|
-
}
|
|
2084
|
-
const message = new ZoomMessage({
|
|
2085
|
-
eventType: event.type,
|
|
2086
|
-
axis: {
|
|
2087
|
-
index: this.axis.index,
|
|
2088
|
-
orientation: this.axis.orientation,
|
|
2089
|
-
},
|
|
2090
|
-
element: this.elementRef,
|
|
2091
|
-
domain,
|
|
2092
|
-
chartId: this.config.id
|
|
2093
|
-
});
|
|
2094
|
-
this.zoomService.fireZoom(message);
|
|
2095
|
-
this.zoomService.broadcastZoom(message);
|
|
2096
|
-
}
|
|
2097
|
-
this.currentTransform = event.transform;
|
|
2098
|
-
}
|
|
2099
|
-
};
|
|
2100
|
-
}
|
|
2231
|
+
elementRef;
|
|
2232
|
+
zoomService;
|
|
2233
|
+
chartService;
|
|
2234
|
+
zone;
|
|
2235
|
+
config;
|
|
2236
|
+
axis;
|
|
2237
|
+
size;
|
|
2238
|
+
zoomable = false;
|
|
2239
|
+
crosshair = false;
|
|
2240
|
+
_element;
|
|
2241
|
+
zoom;
|
|
2242
|
+
alive = true;
|
|
2101
2243
|
mouseenter() {
|
|
2102
2244
|
this.zoom?.on('start zoom end', this.zoomed);
|
|
2103
2245
|
this._element?.call(this.zoom).on('dblclick.zoom', null);
|
|
@@ -2110,6 +2252,13 @@ class ZoomableDirective {
|
|
|
2110
2252
|
this.zoom?.on('start zoom end', null);
|
|
2111
2253
|
this._element?.on('wheel', null);
|
|
2112
2254
|
}
|
|
2255
|
+
currentTransform = zoomIdentity;
|
|
2256
|
+
constructor(elementRef, zoomService, chartService, zone) {
|
|
2257
|
+
this.elementRef = elementRef;
|
|
2258
|
+
this.zoomService = zoomService;
|
|
2259
|
+
this.chartService = chartService;
|
|
2260
|
+
this.zone = zone;
|
|
2261
|
+
}
|
|
2113
2262
|
ngOnInit() {
|
|
2114
2263
|
if (this.axis?.options?.zoom || this.config?.zoom?.enable) {
|
|
2115
2264
|
this.zoomable = this.config?.zoom?.zoomBehavior === ZoomBehaviorType.move && !this.config?.tooltip?.showCrosshair;
|
|
@@ -2197,6 +2346,37 @@ class ZoomableDirective {
|
|
|
2197
2346
|
this.runWheelTranslate();
|
|
2198
2347
|
}
|
|
2199
2348
|
}
|
|
2349
|
+
zoomed = (event) => {
|
|
2350
|
+
if (event.sourceEvent && (this.elementRef.nativeElement === event.sourceEvent.target || this.elementRef.nativeElement.contains(event.sourceEvent.target))) {
|
|
2351
|
+
if (Object.keys(event.sourceEvent).length !== 0) {
|
|
2352
|
+
const origin = this.axis.scale.copy().domain(this.axis.originDomain);
|
|
2353
|
+
if (this.axis.options.scaleType.type === ScaleType.band) {
|
|
2354
|
+
return;
|
|
2355
|
+
}
|
|
2356
|
+
const domain = this.axis.orientation === AxisOrientation.y
|
|
2357
|
+
? event.transform.rescaleY(origin).domain()
|
|
2358
|
+
: event.transform.rescaleX(origin).domain();
|
|
2359
|
+
if (domain[0] === null || domain[0] === undefined
|
|
2360
|
+
|| domain[1] === null || domain[1] === undefined
|
|
2361
|
+
|| Math.abs(domain[0] - domain[1]) < 0.000001) {
|
|
2362
|
+
return;
|
|
2363
|
+
}
|
|
2364
|
+
const message = new ZoomMessage({
|
|
2365
|
+
eventType: event.type,
|
|
2366
|
+
axis: {
|
|
2367
|
+
index: this.axis.index,
|
|
2368
|
+
orientation: this.axis.orientation,
|
|
2369
|
+
},
|
|
2370
|
+
element: this.elementRef,
|
|
2371
|
+
domain,
|
|
2372
|
+
chartId: this.config.id
|
|
2373
|
+
});
|
|
2374
|
+
this.zoomService.fireZoom(message);
|
|
2375
|
+
this.zoomService.broadcastZoom(message);
|
|
2376
|
+
}
|
|
2377
|
+
this.currentTransform = event.transform;
|
|
2378
|
+
}
|
|
2379
|
+
};
|
|
2200
2380
|
runWheelTranslate() {
|
|
2201
2381
|
let type = 'start';
|
|
2202
2382
|
let wheeling;
|
|
@@ -2270,10 +2450,10 @@ class ZoomableDirective {
|
|
|
2270
2450
|
});
|
|
2271
2451
|
});
|
|
2272
2452
|
}
|
|
2453
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ZoomableDirective, deps: [{ token: i0.ElementRef }, { token: ZoomService }, { token: ChartService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2454
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.4", type: ZoomableDirective, selector: "[tetaZoomable]", inputs: { config: "config", axis: "axis", size: "size" }, host: { listeners: { "mouseenter": "mouseenter()", "mouseleave": "mouseleave()" }, properties: { "class.zoomable": "this.zoomable", "class.crosshair": "this.crosshair" } }, ngImport: i0 });
|
|
2273
2455
|
}
|
|
2274
|
-
|
|
2275
|
-
ZoomableDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.2", type: ZoomableDirective, selector: "[tetaZoomable]", inputs: { config: "config", axis: "axis", size: "size" }, host: { listeners: { "mouseenter": "mouseenter()", "mouseleave": "mouseleave()" }, properties: { "class.zoomable": "this.zoomable", "class.crosshair": "this.crosshair" } }, ngImport: i0 });
|
|
2276
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: ZoomableDirective, decorators: [{
|
|
2456
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ZoomableDirective, decorators: [{
|
|
2277
2457
|
type: Directive,
|
|
2278
2458
|
args: [{
|
|
2279
2459
|
selector: '[tetaZoomable]',
|
|
@@ -2299,15 +2479,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
2299
2479
|
}] } });
|
|
2300
2480
|
|
|
2301
2481
|
class BrushableDirective {
|
|
2482
|
+
brushService;
|
|
2483
|
+
chartService;
|
|
2484
|
+
element;
|
|
2485
|
+
zone;
|
|
2486
|
+
config;
|
|
2487
|
+
axis;
|
|
2488
|
+
selection;
|
|
2489
|
+
brush;
|
|
2490
|
+
brushMap = new Map()
|
|
2491
|
+
.set(BrushType.x, d3.brushX())
|
|
2492
|
+
.set(BrushType.y, d3.brushY());
|
|
2493
|
+
_alive = true;
|
|
2494
|
+
_container;
|
|
2302
2495
|
constructor(brushService, chartService, element, zone) {
|
|
2303
2496
|
this.brushService = brushService;
|
|
2304
2497
|
this.chartService = chartService;
|
|
2305
2498
|
this.element = element;
|
|
2306
2499
|
this.zone = zone;
|
|
2307
|
-
this.brushMap = new Map()
|
|
2308
|
-
.set(BrushType.x, d3.brushX())
|
|
2309
|
-
.set(BrushType.y, d3.brushY());
|
|
2310
|
-
this._alive = true;
|
|
2311
2500
|
this._container = d3.select(this.element.nativeElement);
|
|
2312
2501
|
}
|
|
2313
2502
|
ngOnInit() {
|
|
@@ -2429,10 +2618,10 @@ class BrushableDirective {
|
|
|
2429
2618
|
clearPreviousSelection() {
|
|
2430
2619
|
this.selection = null;
|
|
2431
2620
|
}
|
|
2621
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: BrushableDirective, deps: [{ token: BrushService }, { token: ChartService }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2622
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.4", type: BrushableDirective, selector: "[tetaBrushable]", inputs: { config: "config", axis: "axis" }, usesOnChanges: true, ngImport: i0 });
|
|
2432
2623
|
}
|
|
2433
|
-
|
|
2434
|
-
BrushableDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.2", type: BrushableDirective, selector: "[tetaBrushable]", inputs: { config: "config", axis: "axis" }, usesOnChanges: true, ngImport: i0 });
|
|
2435
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: BrushableDirective, decorators: [{
|
|
2624
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: BrushableDirective, decorators: [{
|
|
2436
2625
|
type: Directive,
|
|
2437
2626
|
args: [{
|
|
2438
2627
|
selector: '[tetaBrushable]',
|
|
@@ -2444,14 +2633,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
2444
2633
|
}] } });
|
|
2445
2634
|
|
|
2446
2635
|
class AnnotationComponent {
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
this.x = this.scaleService.scales.pipe(map((_) => _.x.get(this.annotation.xAxisIndex ?? 0)?.scale));
|
|
2452
|
-
this.y = this.scaleService.scales.pipe(map((_) => _.y.get(this.annotation.yAxisIndex ?? 0)?.scale));
|
|
2453
|
-
this.drag = d3.drag();
|
|
2454
|
-
}
|
|
2636
|
+
scaleService;
|
|
2637
|
+
cdr;
|
|
2638
|
+
chartService;
|
|
2639
|
+
visibleRect;
|
|
2455
2640
|
set annotation(annotation) {
|
|
2456
2641
|
this._annotation = annotation;
|
|
2457
2642
|
}
|
|
@@ -2466,6 +2651,19 @@ class AnnotationComponent {
|
|
|
2466
2651
|
get node() {
|
|
2467
2652
|
return this._node;
|
|
2468
2653
|
}
|
|
2654
|
+
x;
|
|
2655
|
+
y;
|
|
2656
|
+
drag;
|
|
2657
|
+
_annotation;
|
|
2658
|
+
_node;
|
|
2659
|
+
constructor(scaleService, cdr, chartService) {
|
|
2660
|
+
this.scaleService = scaleService;
|
|
2661
|
+
this.cdr = cdr;
|
|
2662
|
+
this.chartService = chartService;
|
|
2663
|
+
this.x = this.scaleService.scales.pipe(map((_) => _.x.get(this.annotation.xAxisIndex ?? 0)?.scale));
|
|
2664
|
+
this.y = this.scaleService.scales.pipe(map((_) => _.y.get(this.annotation.yAxisIndex ?? 0)?.scale));
|
|
2665
|
+
this.drag = d3.drag();
|
|
2666
|
+
}
|
|
2469
2667
|
click(event) {
|
|
2470
2668
|
this.chartService.emitAnnotation({
|
|
2471
2669
|
event,
|
|
@@ -2514,12 +2712,12 @@ class AnnotationComponent {
|
|
|
2514
2712
|
d3.select(this.node.nativeElement).call(this.drag);
|
|
2515
2713
|
}
|
|
2516
2714
|
}
|
|
2715
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: AnnotationComponent, deps: [{ token: ScaleService }, { token: i0.ChangeDetectorRef }, { token: ChartService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2716
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: AnnotationComponent, selector: "[teta-annotation]", inputs: { visibleRect: "visibleRect", annotation: "annotation" }, host: { listeners: { "click": "click($event)", "contextmenu": "contextMenu($event)" } }, viewQueries: [{ propertyName: "node", first: true, predicate: ["annotationNode"], descendants: true }], ngImport: i0, template: "<ng-container *ngIf=\"{\n x: x | async,\n y: y | async\n } as data\">\n <ng-container *ngIf=\"data.x && data.y\">\n\n\n <svg:circle\n [attr.r]=\"annotation.style?.radius ?? 5\"\n [attr.cx]=\"data.x(annotation.point.x)\"\n [attr.fill]=\"annotation?.style?.fill ?? 'var(--color-text-90)'\"\n [attr.cy]=\"data.y(annotation.point.y)\">\n </svg:circle>\n <svg:line\n [attr.x1]=\"data.x(annotation.point.x)\"\n [attr.y1]=\"data.y(annotation.point.y)\"\n [attr.x2]=\"data.x(annotation.point.x) + (annotation.dx ?? 0)\"\n [attr.y2]=\"data.y(annotation.point.y) + (annotation.dy ?? 0)\"\n [attr.stroke]=\"annotation.style?.stroke ?? 'var(--color-text-90)'\"\n [attr.stroke-width]=\"annotation.style?.strokeWidth ?? 1\"\n [attr.stroke-dasharray]=\"annotation.style?.strokeDasharray ?? null\"\n >\n </svg:line>\n <svg:foreignObject\n class=\"position-absolute\"\n [attr.width]=\"node?.nativeElement.offsetWidth ?? 0\"\n [attr.height]=\"node?.nativeElement.offsetHeight ?? 0\"\n [attr.x]=\"data.x(annotation.point.x) + (annotation.dx ?? 0) - 10\"\n [attr.y]=\"data.y(annotation.point.y) + (annotation.dy ?? 0) - 10\">\n <div\n #annotationNode\n [style.background-color]=\"annotation.style?.fill ?? 'var(--color-global-bgmain)'\"\n [style.cursor]=\"annotation?.draggable ? 'move' : 'default'\"\n [className]=\"'padding-h-2 ' + annotation.className ?? ''\"\n style=\"border-radius: 2px; display: inline-block;\">\n <ng-container *ngIf=\"annotation.template;else default\">\n <ng-container *ngTemplateOutlet=\"annotation.template;context: {$implicit: annotation}\"></ng-container>\n </ng-container>\n </div>\n </svg:foreignObject>\n </ng-container>\n</ng-container>\n<ng-template #default>\n {{ annotation.note?.label}}\n</ng-template>\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2517
2717
|
}
|
|
2518
|
-
|
|
2519
|
-
AnnotationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: AnnotationComponent, selector: "[teta-annotation]", inputs: { visibleRect: "visibleRect", annotation: "annotation" }, host: { listeners: { "click": "click($event)", "contextmenu": "contextMenu($event)" } }, viewQueries: [{ propertyName: "node", first: true, predicate: ["annotationNode"], descendants: true }], ngImport: i0, template: "<ng-container *ngIf=\"{\n x: x | async,\n y: y | async\n } as data\">\n <ng-container *ngIf=\"data.x && data.y\">\n\n\n <svg:circle\n [attr.r]=\"annotation.style?.radius ?? 5\"\n [attr.cx]=\"data.x(annotation.point.x)\"\n [attr.fill]=\"annotation?.style?.fill ?? 'var(--color-text-90)'\"\n [attr.cy]=\"data.y(annotation.point.y)\">\n </svg:circle>\n <svg:line\n [attr.x1]=\"data.x(annotation.point.x)\"\n [attr.y1]=\"data.y(annotation.point.y)\"\n [attr.x2]=\"data.x(annotation.point.x) + (annotation.dx ?? 0)\"\n [attr.y2]=\"data.y(annotation.point.y) + (annotation.dy ?? 0)\"\n [attr.stroke]=\"annotation.style?.stroke ?? 'var(--color-text-90)'\"\n [attr.stroke-width]=\"annotation.style?.strokeWidth ?? 1\"\n [attr.stroke-dasharray]=\"annotation.style?.strokeDasharray ?? null\"\n >\n </svg:line>\n <svg:foreignObject\n class=\"position-absolute\"\n [attr.width]=\"node?.nativeElement.offsetWidth ?? 0\"\n [attr.height]=\"node?.nativeElement.offsetHeight ?? 0\"\n [attr.x]=\"data.x(annotation.point.x) + (annotation.dx ?? 0) - 10\"\n [attr.y]=\"data.y(annotation.point.y) + (annotation.dy ?? 0) - 10\">\n <div\n #annotationNode\n [style.background-color]=\"annotation.style?.fill ?? 'var(--color-text-90)'\"\n [style.cursor]=\"annotation?.draggable ? 'move' : 'default'\"\n [className]=\"'padding-h-2 ' + annotation.className ?? ''\"\n style=\"border-radius: 2px; display: inline-block;\">\n <ng-container *ngIf=\"annotation.template;else default\">\n <ng-container *ngTemplateOutlet=\"annotation.template;context: {$implicit: annotation}\"></ng-container>\n </ng-container>\n </div>\n </svg:foreignObject>\n </ng-container>\n</ng-container>\n<ng-template #default>\n {{ annotation.note?.label}}\n</ng-template>\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2520
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AnnotationComponent, decorators: [{
|
|
2718
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: AnnotationComponent, decorators: [{
|
|
2521
2719
|
type: Component,
|
|
2522
|
-
args: [{ selector: '[teta-annotation]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"{\n x: x | async,\n y: y | async\n } as data\">\n <ng-container *ngIf=\"data.x && data.y\">\n\n\n <svg:circle\n [attr.r]=\"annotation.style?.radius ?? 5\"\n [attr.cx]=\"data.x(annotation.point.x)\"\n [attr.fill]=\"annotation?.style?.fill ?? 'var(--color-text-90)'\"\n [attr.cy]=\"data.y(annotation.point.y)\">\n </svg:circle>\n <svg:line\n [attr.x1]=\"data.x(annotation.point.x)\"\n [attr.y1]=\"data.y(annotation.point.y)\"\n [attr.x2]=\"data.x(annotation.point.x) + (annotation.dx ?? 0)\"\n [attr.y2]=\"data.y(annotation.point.y) + (annotation.dy ?? 0)\"\n [attr.stroke]=\"annotation.style?.stroke ?? 'var(--color-text-90)'\"\n [attr.stroke-width]=\"annotation.style?.strokeWidth ?? 1\"\n [attr.stroke-dasharray]=\"annotation.style?.strokeDasharray ?? null\"\n >\n </svg:line>\n <svg:foreignObject\n class=\"position-absolute\"\n [attr.width]=\"node?.nativeElement.offsetWidth ?? 0\"\n [attr.height]=\"node?.nativeElement.offsetHeight ?? 0\"\n [attr.x]=\"data.x(annotation.point.x) + (annotation.dx ?? 0) - 10\"\n [attr.y]=\"data.y(annotation.point.y) + (annotation.dy ?? 0) - 10\">\n <div\n #annotationNode\n [style.background-color]=\"annotation.style?.fill ?? 'var(--color-
|
|
2720
|
+
args: [{ selector: '[teta-annotation]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"{\n x: x | async,\n y: y | async\n } as data\">\n <ng-container *ngIf=\"data.x && data.y\">\n\n\n <svg:circle\n [attr.r]=\"annotation.style?.radius ?? 5\"\n [attr.cx]=\"data.x(annotation.point.x)\"\n [attr.fill]=\"annotation?.style?.fill ?? 'var(--color-text-90)'\"\n [attr.cy]=\"data.y(annotation.point.y)\">\n </svg:circle>\n <svg:line\n [attr.x1]=\"data.x(annotation.point.x)\"\n [attr.y1]=\"data.y(annotation.point.y)\"\n [attr.x2]=\"data.x(annotation.point.x) + (annotation.dx ?? 0)\"\n [attr.y2]=\"data.y(annotation.point.y) + (annotation.dy ?? 0)\"\n [attr.stroke]=\"annotation.style?.stroke ?? 'var(--color-text-90)'\"\n [attr.stroke-width]=\"annotation.style?.strokeWidth ?? 1\"\n [attr.stroke-dasharray]=\"annotation.style?.strokeDasharray ?? null\"\n >\n </svg:line>\n <svg:foreignObject\n class=\"position-absolute\"\n [attr.width]=\"node?.nativeElement.offsetWidth ?? 0\"\n [attr.height]=\"node?.nativeElement.offsetHeight ?? 0\"\n [attr.x]=\"data.x(annotation.point.x) + (annotation.dx ?? 0) - 10\"\n [attr.y]=\"data.y(annotation.point.y) + (annotation.dy ?? 0) - 10\">\n <div\n #annotationNode\n [style.background-color]=\"annotation.style?.fill ?? 'var(--color-global-bgmain)'\"\n [style.cursor]=\"annotation?.draggable ? 'move' : 'default'\"\n [className]=\"'padding-h-2 ' + annotation.className ?? ''\"\n style=\"border-radius: 2px; display: inline-block;\">\n <ng-container *ngIf=\"annotation.template;else default\">\n <ng-container *ngTemplateOutlet=\"annotation.template;context: {$implicit: annotation}\"></ng-container>\n </ng-container>\n </div>\n </svg:foreignObject>\n </ng-container>\n</ng-container>\n<ng-template #default>\n {{ annotation.note?.label}}\n</ng-template>\n" }]
|
|
2523
2721
|
}], ctorParameters: function () { return [{ type: ScaleService }, { type: i0.ChangeDetectorRef }, { type: ChartService }]; }, propDecorators: { visibleRect: [{
|
|
2524
2722
|
type: Input
|
|
2525
2723
|
}], annotation: [{
|
|
@@ -2536,6 +2734,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
2536
2734
|
}] } });
|
|
2537
2735
|
|
|
2538
2736
|
class CrosshairComponent {
|
|
2737
|
+
scaleService;
|
|
2738
|
+
chartService;
|
|
2739
|
+
cdr;
|
|
2740
|
+
size;
|
|
2741
|
+
transform;
|
|
2539
2742
|
constructor(scaleService, chartService, cdr) {
|
|
2540
2743
|
this.scaleService = scaleService;
|
|
2541
2744
|
this.chartService = chartService;
|
|
@@ -2553,10 +2756,10 @@ class CrosshairComponent {
|
|
|
2553
2756
|
});
|
|
2554
2757
|
}));
|
|
2555
2758
|
}
|
|
2759
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: CrosshairComponent, deps: [{ token: ScaleService }, { token: ChartService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
2760
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: CrosshairComponent, selector: "[teta-crosshair]", inputs: { size: "size" }, ngImport: i0, template: "<ng-container *ngIf=\"transform | async as t\">\n <svg:line [attr.x1]=\"t.x\" y1=\"0\" [attr.x2]=\"t.x\" [attr.y2]=\"size.height\" stroke=\"var(--color-text-90)\" stroke-width=\"0.5\"></svg:line>\n <svg:line x1=\"0\" [attr.y1]=\"t.y\" [attr.x2]=\"size.width\" [attr.y2]=\"t.y\" stroke=\"var(--color-text-90)\" stroke-width=\"0.5\"></svg:line>\n</ng-container>\n", styles: [":host{shape-rendering:crispEdges;pointer-events:none}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }] });
|
|
2556
2761
|
}
|
|
2557
|
-
|
|
2558
|
-
CrosshairComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: CrosshairComponent, selector: "[teta-crosshair]", inputs: { size: "size" }, ngImport: i0, template: "<ng-container *ngIf=\"transform | async as t\">\n <svg:line [attr.x1]=\"t.x\" y1=\"0\" [attr.x2]=\"t.x\" [attr.y2]=\"size.height\" stroke=\"var(--color-text-90)\" stroke-width=\"0.5\"></svg:line>\n <svg:line x1=\"0\" [attr.y1]=\"t.y\" [attr.x2]=\"size.width\" [attr.y2]=\"t.y\" stroke=\"var(--color-text-90)\" stroke-width=\"0.5\"></svg:line>\n</ng-container>\n", styles: [":host{shape-rendering:crispEdges;pointer-events:none}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }] });
|
|
2559
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: CrosshairComponent, decorators: [{
|
|
2762
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: CrosshairComponent, decorators: [{
|
|
2560
2763
|
type: Component,
|
|
2561
2764
|
args: [{ selector: '[teta-crosshair]', template: "<ng-container *ngIf=\"transform | async as t\">\n <svg:line [attr.x1]=\"t.x\" y1=\"0\" [attr.x2]=\"t.x\" [attr.y2]=\"size.height\" stroke=\"var(--color-text-90)\" stroke-width=\"0.5\"></svg:line>\n <svg:line x1=\"0\" [attr.y1]=\"t.y\" [attr.x2]=\"size.width\" [attr.y2]=\"t.y\" stroke=\"var(--color-text-90)\" stroke-width=\"0.5\"></svg:line>\n</ng-container>\n", styles: [":host{shape-rendering:crispEdges;pointer-events:none}\n"] }]
|
|
2562
2765
|
}], ctorParameters: function () { return [{ type: ScaleService }, { type: ChartService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { size: [{
|
|
@@ -2564,6 +2767,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
2564
2767
|
}] } });
|
|
2565
2768
|
|
|
2566
2769
|
class ChartContainerComponent {
|
|
2770
|
+
_svc;
|
|
2771
|
+
_cdr;
|
|
2772
|
+
_scaleService;
|
|
2773
|
+
_zoomService;
|
|
2774
|
+
_elementRef;
|
|
2775
|
+
_zone;
|
|
2776
|
+
config;
|
|
2777
|
+
scales;
|
|
2778
|
+
size;
|
|
2779
|
+
visibleRect;
|
|
2780
|
+
brushScale;
|
|
2781
|
+
zoomType = ZoomType;
|
|
2782
|
+
_observer;
|
|
2783
|
+
filterPositionMap = new Map()
|
|
2784
|
+
.set(true, (axis) => (_) => _.options.opposite && _.options.visible && axis.index <= _.index)
|
|
2785
|
+
.set(false, (axis) => (_) => _.options.opposite !== true &&
|
|
2786
|
+
_.options.visible &&
|
|
2787
|
+
_.index <= axis.index);
|
|
2567
2788
|
constructor(_svc, _cdr, _scaleService, _zoomService, _elementRef, _zone) {
|
|
2568
2789
|
this._svc = _svc;
|
|
2569
2790
|
this._cdr = _cdr;
|
|
@@ -2571,13 +2792,6 @@ class ChartContainerComponent {
|
|
|
2571
2792
|
this._zoomService = _zoomService;
|
|
2572
2793
|
this._elementRef = _elementRef;
|
|
2573
2794
|
this._zone = _zone;
|
|
2574
|
-
this.zoomType = ZoomType;
|
|
2575
|
-
this.filterPositionMap = new Map()
|
|
2576
|
-
.set(true, (axis) => (_) => _.options.opposite && _.options.visible && axis.index <= _.index)
|
|
2577
|
-
.set(false, (axis) => (_) => _.options.opposite !== true &&
|
|
2578
|
-
_.options.visible &&
|
|
2579
|
-
_.index <= axis.index);
|
|
2580
|
-
this.sumSize = (acc, curr) => acc + curr.selfSize;
|
|
2581
2795
|
this.config = this._svc.config;
|
|
2582
2796
|
this.size = this._svc.size;
|
|
2583
2797
|
this.scales = this._scaleService.scales.pipe(observeOn(animationFrameScheduler), tetaZoneFull(this._zone), shareReplay({
|
|
@@ -2647,6 +2861,7 @@ class ChartContainerComponent {
|
|
|
2647
2861
|
this._observer.unobserve(this._elementRef.nativeElement);
|
|
2648
2862
|
this._observer.disconnect();
|
|
2649
2863
|
}
|
|
2864
|
+
sumSize = (acc, curr) => acc + curr.selfSize;
|
|
2650
2865
|
getTranslate(axis, size) {
|
|
2651
2866
|
return this.scales.pipe(withLatestFrom(this.config), map((data) => {
|
|
2652
2867
|
const [{ x, y }, config] = data;
|
|
@@ -2715,25 +2930,27 @@ class ChartContainerComponent {
|
|
|
2715
2930
|
trackSerie(index, item) {
|
|
2716
2931
|
return item.name?.length ? item.name : index;
|
|
2717
2932
|
}
|
|
2933
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ChartContainerComponent, deps: [{ token: ChartService }, { token: i0.ChangeDetectorRef }, { token: ScaleService }, { token: ZoomService }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
2934
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: ChartContainerComponent, selector: "teta-chart-container", ngImport: i0, template: "<ng-container *ngIf=\"{\n size: size | async,\n config: config | async,\n scales: scales | async,\n visibleRect: visibleRect | async\n} as data\" xmlns:svg=\"http://www.w3.org/1999/html\">\n <teta-tooltip *ngIf=\"data.config?.tooltip?.enable\"\n [size]=\"data.size\"\n [config]=\"data.config\"></teta-tooltip>\n <ng-container *ngIf=\"data.size?.height > 0\n && data.size?.width > 0\n && data.visibleRect?.height > 0\n && data.visibleRect?.width > 0\n && data.scales?.x.size === data.config.xAxis.length\n && data.scales?.y.size === data.config.yAxis.length\">\n <svg height=\"100%\" width=\"100%\" class=\"position-absolute\">\n <g class=\"y-axis-container\">\n <ng-container *ngFor=\"let item of data.scales.y | keyvalue; trackBy: identify\">\n <ng-container *ngIf=\"item.value.selfSize > 0\n && item.value.options.visible\n && data.scales.x.size > 0\n && data.scales.y.size > 0\">\n <g\n teta-y-axis\n [axis]=\"item.value\"\n [size]=\"data.visibleRect\"\n [attr.transform]=\"getTranslate(item.value, data.size) | async\"></g>\n <rect\n tetaZoomable\n fill-opacity=\"0\"\n [axis]=\"item.value\"\n [config]=\"data.config\"\n [size]=\"data.visibleRect\"\n [attr.x]=\"item.value.options.opposite ? 0 : -item.value.selfSize\"\n [attr.y]=\"0\"\n [attr.height]=\"data.visibleRect.height\"\n [attr.width]=\"item.value.selfSize\"\n [attr.transform]=\"getTranslate(item.value, data.size) | async\"></rect>\n </ng-container>\n\n </ng-container>\n </g>\n <g class=\"x-axis-container\">\n <ng-container *ngFor=\"let item of data.scales.x | keyvalue; trackBy: identify\">\n <ng-container *ngIf=\"item.value.options.visible && data.scales.x.size > 0 && data.scales.y.size > 0\">\n <g\n teta-x-axis\n [axis]=\"item.value\"\n [size]=\"data.visibleRect\"\n [attr.transform]=\"getTranslate(item.value, data.size) | async\"></g>\n <rect\n tetaZoomable\n fill-opacity=\"0\"\n [axis]=\"item.value\"\n [config]=\"data.config\"\n [size]=\"data.visibleRect\"\n [attr.x]=\"0\"\n [attr.y]=\"item.value.options.opposite ? -item.value.selfSize : 0\"\n [attr.width]=\"data.visibleRect.width\"\n [attr.height]=\"item.value.selfSize\"\n [attr.transform]=\"getTranslate(item.value, data.size) | async\"></rect>\n </ng-container>\n </ng-container>\n </g>\n </svg>\n </ng-container>\n <ng-container\n *ngIf=\"data.size?.height > 0\n && data.size?.width > 0\n && data.visibleRect?.height > 0\n && data.visibleRect?.width > 0\n && data.scales?.x.size === data.config.xAxis.length\n && data.scales?.y.size === data.config.yAxis.length\">\n <svg\n tetaZoomable\n tetaBrushable\n class=\"position-absolute\"\n [size]=\"data.visibleRect\"\n [config]=\"data.config\"\n [axis]=\"data.config?.zoom?.type === zoomType.x ? data.scales.x.get(0) : data.scales.y.get(0)\"\n [attr.width]=\"data.visibleRect.width\"\n [attr.height]=\"data.visibleRect.height\"\n [attr.viewBox]=\"'0 0 ' + data.visibleRect.width + ' ' + data.visibleRect.height\"\n [style.transform]=\"'translate('+ data.visibleRect.x +'px, '+ data.visibleRect.y +'px)'\"\n (contextmenu)=\"contextMenu($event, data.scales.x, data.scales.y)\"\n (click)=\"click($event, data.scales.x, data.scales.y)\"\n (mouseleave)=\"mouseLeave($event)\"\n (mousemove)=\"mouseMove($event)\">\n\n <g class=\"gridlines\"\n teta-gridlines\n *ngIf=\"data.config.gridLines?.enable !== false\"\n [size]=\"data.size\"></g>\n\n <g class=\"x-axis-plotband-container\">\n <ng-container *ngFor=\"let axis of data.config.xAxis; let i = index\">\n <g teta-plot-band *ngFor=\"let plotBand of axis.plotBands\"\n [plotBand]=\"plotBand\"\n [scale]=\"data.scales.x.get(i).scale\"\n [size]=\"data.visibleRect\"\n [axis]=\"data.scales.x.get(i)\"></g>\n </ng-container>\n </g>\n <g class=\"y-axis-plotband-container\">\n <ng-container *ngFor=\"let axis of data.config.yAxis; let i = index\">\n <g teta-plot-band *ngFor=\"let plotBand of axis.plotBands\"\n [plotBand]=\"plotBand\"\n [scale]=\"data.scales.y.get(i).scale\"\n [size]=\"data.visibleRect\"\n [axis]=\"data.scales.y.get(i)\"></g>\n </ng-container>\n </g>\n <g class=\"x-axis-plotline-container\">\n <ng-container *ngFor=\"let axis of data.config.xAxis; let i = index\">\n <g teta-plot-line *ngFor=\"let plotLine of axis.plotLines\"\n [plotLine]=\"plotLine\"\n [scale]=\"data.scales.x.get(i).scale\"\n [size]=\"data.size\"\n [axis]=\"data.scales.x.get(i)\"></g>\n </ng-container>\n </g>\n <g class=\"y-axis-plotline-container\">\n <ng-container *ngFor=\"let axis of data.config.yAxis; let i = index\">\n <g teta-plot-line *ngFor=\"let plotLine of axis.plotLines\"\n [plotLine]=\"plotLine\"\n [scale]=\"data.scales.y.get(i).scale\"\n [size]=\"data.size\"\n [axis]=\"data.scales.y.get(i)\"></g>\n </ng-container>\n </g>\n <g class=\"series-container\">\n <ng-container *ngFor=\"let series of data.config.series;\">\n <g teta-series-host\n *ngIf=\"series.visible\"\n [config]=\"data.config\"\n [series]=\"series\"></g>\n </ng-container>\n </g>\n <g class=\"annotations\">\n <g teta-annotation\n [visibleRect]=\"data.visibleRect\"\n *ngFor=\"let annotation of data.config.annotations\"\n [annotation]=\"annotation\"></g>\n </g>\n <g class=\"crosshair\" *ngIf=\"data.config.tooltip?.showCrosshair\">\n <g teta-crosshair [size]=\"data.visibleRect\"></g>\n </g>\n </svg>\n\n </ng-container>\n</ng-container>\n", styles: [":host{display:flex;flex-direction:column;flex-grow:1;min-width:0;min-height:0}:host .zoomable:hover{cursor:grab}:host .zoomable:active{cursor:grabbing}:host .crosshair{cursor:crosshair}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: SeriesHostComponent, selector: "[teta-series-host]", inputs: ["config", "series"] }, { kind: "component", type: GridlinesComponent, selector: "[teta-gridlines]", inputs: ["size"] }, { kind: "component", type: XAxisComponent, selector: "[teta-x-axis]", inputs: ["axis", "size"] }, { kind: "component", type: YAxisComponent, selector: "[teta-y-axis]", inputs: ["axis", "size"] }, { kind: "component", type: PlotlineComponent, selector: "[teta-plot-line]", inputs: ["plotLine", "size", "axis", "scale"] }, { kind: "component", type: PlotBandComponent, selector: "[teta-plot-band]", inputs: ["plotBand", "axis", "scale", "size"] }, { kind: "component", type: TooltipComponent, selector: "teta-tooltip", inputs: ["size", "config"] }, { kind: "directive", type: ZoomableDirective, selector: "[tetaZoomable]", inputs: ["config", "axis", "size"] }, { kind: "directive", type: BrushableDirective, selector: "[tetaBrushable]", inputs: ["config", "axis"] }, { kind: "component", type: AnnotationComponent, selector: "[teta-annotation]", inputs: ["visibleRect", "annotation"] }, { kind: "component", type: CrosshairComponent, selector: "[teta-crosshair]", inputs: ["size"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.KeyValuePipe, name: "keyvalue" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2718
2935
|
}
|
|
2719
|
-
|
|
2720
|
-
ChartContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: ChartContainerComponent, selector: "teta-chart-container", ngImport: i0, template: "<ng-container *ngIf=\"{\n size: size | async,\n config: config | async,\n scales: scales | async,\n visibleRect: visibleRect | async\n} as data\" xmlns:svg=\"http://www.w3.org/1999/html\">\n <teta-tooltip *ngIf=\"data.config?.tooltip?.enable\"\n [size]=\"data.size\"\n [config]=\"data.config\"></teta-tooltip>\n <ng-container *ngIf=\"data.size?.height > 0\n && data.size?.width > 0\n && data.visibleRect?.height > 0\n && data.visibleRect?.width > 0\n && data.scales?.x.size === data.config.xAxis.length\n && data.scales?.y.size === data.config.yAxis.length\">\n <svg height=\"100%\" width=\"100%\" class=\"position-absolute\">\n <g class=\"y-axis-container\">\n <ng-container *ngFor=\"let item of data.scales.y | keyvalue; trackBy: identify\">\n <ng-container *ngIf=\"item.value.selfSize > 0\n && item.value.options.visible\n && data.scales.x.size > 0\n && data.scales.y.size > 0\">\n <g\n teta-y-axis\n [axis]=\"item.value\"\n [size]=\"data.visibleRect\"\n [attr.transform]=\"getTranslate(item.value, data.size) | async\"></g>\n <rect\n tetaZoomable\n fill-opacity=\"0\"\n [axis]=\"item.value\"\n [config]=\"data.config\"\n [size]=\"data.visibleRect\"\n [attr.x]=\"item.value.options.opposite ? 0 : -item.value.selfSize\"\n [attr.y]=\"0\"\n [attr.height]=\"data.visibleRect.height\"\n [attr.width]=\"item.value.selfSize\"\n [attr.transform]=\"getTranslate(item.value, data.size) | async\"></rect>\n </ng-container>\n\n </ng-container>\n </g>\n <g class=\"x-axis-container\">\n <ng-container *ngFor=\"let item of data.scales.x | keyvalue; trackBy: identify\">\n <ng-container *ngIf=\"item.value.options.visible && data.scales.x.size > 0 && data.scales.y.size > 0\">\n <g\n teta-x-axis\n [axis]=\"item.value\"\n [size]=\"data.visibleRect\"\n [attr.transform]=\"getTranslate(item.value, data.size) | async\"></g>\n <rect\n tetaZoomable\n fill-opacity=\"0\"\n [axis]=\"item.value\"\n [config]=\"data.config\"\n [size]=\"data.visibleRect\"\n [attr.x]=\"0\"\n [attr.y]=\"item.value.options.opposite ? -item.value.selfSize : 0\"\n [attr.width]=\"data.visibleRect.width\"\n [attr.height]=\"item.value.selfSize\"\n [attr.transform]=\"getTranslate(item.value, data.size) | async\"></rect>\n </ng-container>\n </ng-container>\n </g>\n </svg>\n </ng-container>\n <ng-container\n *ngIf=\"data.size?.height > 0\n && data.size?.width > 0\n && data.visibleRect?.height > 0\n && data.visibleRect?.width > 0\n && data.scales?.x.size === data.config.xAxis.length\n && data.scales?.y.size === data.config.yAxis.length\">\n <svg\n tetaZoomable\n tetaBrushable\n class=\"position-absolute\"\n [size]=\"data.visibleRect\"\n [config]=\"data.config\"\n [axis]=\"data.config?.zoom?.type === zoomType.x ? data.scales.x.get(0) : data.scales.y.get(0)\"\n [attr.width]=\"data.visibleRect.width\"\n [attr.height]=\"data.visibleRect.height\"\n [attr.viewBox]=\"'0 0 ' + data.visibleRect.width + ' ' + data.visibleRect.height\"\n [style.transform]=\"'translate('+ data.visibleRect.x +'px, '+ data.visibleRect.y +'px)'\"\n (contextmenu)=\"contextMenu($event, data.scales.x, data.scales.y)\"\n (click)=\"click($event, data.scales.x, data.scales.y)\"\n (mouseleave)=\"mouseLeave($event)\"\n (mousemove)=\"mouseMove($event)\">\n\n <g class=\"gridlines\"\n teta-gridlines\n *ngIf=\"data.config.gridLines?.enable !== false\"\n [size]=\"data.size\"></g>\n\n <g class=\"x-axis-plotband-container\">\n <ng-container *ngFor=\"let axis of data.config.xAxis; let i = index\">\n <g teta-plot-band *ngFor=\"let plotBand of axis.plotBands\"\n [plotBand]=\"plotBand\"\n [scale]=\"data.scales.x.get(i).scale\"\n [size]=\"data.visibleRect\"\n [axis]=\"data.scales.x.get(i)\"></g>\n </ng-container>\n </g>\n <g class=\"y-axis-plotband-container\">\n <ng-container *ngFor=\"let axis of data.config.yAxis; let i = index\">\n <g teta-plot-band *ngFor=\"let plotBand of axis.plotBands\"\n [plotBand]=\"plotBand\"\n [scale]=\"data.scales.y.get(i).scale\"\n [size]=\"data.visibleRect\"\n [axis]=\"data.scales.y.get(i)\"></g>\n </ng-container>\n </g>\n <g class=\"x-axis-plotline-container\">\n <ng-container *ngFor=\"let axis of data.config.xAxis; let i = index\">\n <g teta-plot-line *ngFor=\"let plotLine of axis.plotLines\"\n [plotLine]=\"plotLine\"\n [scale]=\"data.scales.x.get(i).scale\"\n [size]=\"data.size\"\n [axis]=\"data.scales.x.get(i)\"></g>\n </ng-container>\n </g>\n <g class=\"y-axis-plotline-container\">\n <ng-container *ngFor=\"let axis of data.config.yAxis; let i = index\">\n <g teta-plot-line *ngFor=\"let plotLine of axis.plotLines\"\n [plotLine]=\"plotLine\"\n [scale]=\"data.scales.y.get(i).scale\"\n [size]=\"data.size\"\n [axis]=\"data.scales.y.get(i)\"></g>\n </ng-container>\n </g>\n <g class=\"series-container\">\n <ng-container *ngFor=\"let series of data.config.series;\">\n <g teta-series-host\n *ngIf=\"series.visible\"\n [config]=\"data.config\"\n [series]=\"series\"></g>\n </ng-container>\n </g>\n <g class=\"annotations\">\n <g teta-annotation\n [visibleRect]=\"data.visibleRect\"\n *ngFor=\"let annotation of data.config.annotations\"\n [annotation]=\"annotation\"></g>\n </g>\n <g class=\"crosshair\" *ngIf=\"data.config.tooltip?.showCrosshair\">\n <g teta-crosshair [size]=\"data.visibleRect\"></g>\n </g>\n </svg>\n\n </ng-container>\n</ng-container>\n", styles: [":host{display:flex;flex-direction:column;flex-grow:1;min-width:0;min-height:0}:host .zoomable:hover{cursor:grab}:host .zoomable:active{cursor:grabbing}:host .crosshair{cursor:crosshair}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: SeriesHostComponent, selector: "[teta-series-host]", inputs: ["config", "series"] }, { kind: "component", type: GridlinesComponent, selector: "[teta-gridlines]", inputs: ["size"] }, { kind: "component", type: XAxisComponent, selector: "[teta-x-axis]", inputs: ["axis", "size"] }, { kind: "component", type: YAxisComponent, selector: "[teta-y-axis]", inputs: ["axis", "size"] }, { kind: "component", type: PlotlineComponent, selector: "[teta-plot-line]", inputs: ["plotLine", "size", "axis", "scale"] }, { kind: "component", type: PlotBandComponent, selector: "[teta-plot-band]", inputs: ["plotBand", "axis", "scale", "size"] }, { kind: "component", type: TooltipComponent, selector: "teta-tooltip", inputs: ["size", "config"] }, { kind: "directive", type: ZoomableDirective, selector: "[tetaZoomable]", inputs: ["config", "axis", "size"] }, { kind: "directive", type: BrushableDirective, selector: "[tetaBrushable]", inputs: ["config", "axis"] }, { kind: "component", type: AnnotationComponent, selector: "[teta-annotation]", inputs: ["visibleRect", "annotation"] }, { kind: "component", type: CrosshairComponent, selector: "[teta-crosshair]", inputs: ["size"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.KeyValuePipe, name: "keyvalue" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2721
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: ChartContainerComponent, decorators: [{
|
|
2936
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ChartContainerComponent, decorators: [{
|
|
2722
2937
|
type: Component,
|
|
2723
2938
|
args: [{ selector: 'teta-chart-container', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"{\n size: size | async,\n config: config | async,\n scales: scales | async,\n visibleRect: visibleRect | async\n} as data\" xmlns:svg=\"http://www.w3.org/1999/html\">\n <teta-tooltip *ngIf=\"data.config?.tooltip?.enable\"\n [size]=\"data.size\"\n [config]=\"data.config\"></teta-tooltip>\n <ng-container *ngIf=\"data.size?.height > 0\n && data.size?.width > 0\n && data.visibleRect?.height > 0\n && data.visibleRect?.width > 0\n && data.scales?.x.size === data.config.xAxis.length\n && data.scales?.y.size === data.config.yAxis.length\">\n <svg height=\"100%\" width=\"100%\" class=\"position-absolute\">\n <g class=\"y-axis-container\">\n <ng-container *ngFor=\"let item of data.scales.y | keyvalue; trackBy: identify\">\n <ng-container *ngIf=\"item.value.selfSize > 0\n && item.value.options.visible\n && data.scales.x.size > 0\n && data.scales.y.size > 0\">\n <g\n teta-y-axis\n [axis]=\"item.value\"\n [size]=\"data.visibleRect\"\n [attr.transform]=\"getTranslate(item.value, data.size) | async\"></g>\n <rect\n tetaZoomable\n fill-opacity=\"0\"\n [axis]=\"item.value\"\n [config]=\"data.config\"\n [size]=\"data.visibleRect\"\n [attr.x]=\"item.value.options.opposite ? 0 : -item.value.selfSize\"\n [attr.y]=\"0\"\n [attr.height]=\"data.visibleRect.height\"\n [attr.width]=\"item.value.selfSize\"\n [attr.transform]=\"getTranslate(item.value, data.size) | async\"></rect>\n </ng-container>\n\n </ng-container>\n </g>\n <g class=\"x-axis-container\">\n <ng-container *ngFor=\"let item of data.scales.x | keyvalue; trackBy: identify\">\n <ng-container *ngIf=\"item.value.options.visible && data.scales.x.size > 0 && data.scales.y.size > 0\">\n <g\n teta-x-axis\n [axis]=\"item.value\"\n [size]=\"data.visibleRect\"\n [attr.transform]=\"getTranslate(item.value, data.size) | async\"></g>\n <rect\n tetaZoomable\n fill-opacity=\"0\"\n [axis]=\"item.value\"\n [config]=\"data.config\"\n [size]=\"data.visibleRect\"\n [attr.x]=\"0\"\n [attr.y]=\"item.value.options.opposite ? -item.value.selfSize : 0\"\n [attr.width]=\"data.visibleRect.width\"\n [attr.height]=\"item.value.selfSize\"\n [attr.transform]=\"getTranslate(item.value, data.size) | async\"></rect>\n </ng-container>\n </ng-container>\n </g>\n </svg>\n </ng-container>\n <ng-container\n *ngIf=\"data.size?.height > 0\n && data.size?.width > 0\n && data.visibleRect?.height > 0\n && data.visibleRect?.width > 0\n && data.scales?.x.size === data.config.xAxis.length\n && data.scales?.y.size === data.config.yAxis.length\">\n <svg\n tetaZoomable\n tetaBrushable\n class=\"position-absolute\"\n [size]=\"data.visibleRect\"\n [config]=\"data.config\"\n [axis]=\"data.config?.zoom?.type === zoomType.x ? data.scales.x.get(0) : data.scales.y.get(0)\"\n [attr.width]=\"data.visibleRect.width\"\n [attr.height]=\"data.visibleRect.height\"\n [attr.viewBox]=\"'0 0 ' + data.visibleRect.width + ' ' + data.visibleRect.height\"\n [style.transform]=\"'translate('+ data.visibleRect.x +'px, '+ data.visibleRect.y +'px)'\"\n (contextmenu)=\"contextMenu($event, data.scales.x, data.scales.y)\"\n (click)=\"click($event, data.scales.x, data.scales.y)\"\n (mouseleave)=\"mouseLeave($event)\"\n (mousemove)=\"mouseMove($event)\">\n\n <g class=\"gridlines\"\n teta-gridlines\n *ngIf=\"data.config.gridLines?.enable !== false\"\n [size]=\"data.size\"></g>\n\n <g class=\"x-axis-plotband-container\">\n <ng-container *ngFor=\"let axis of data.config.xAxis; let i = index\">\n <g teta-plot-band *ngFor=\"let plotBand of axis.plotBands\"\n [plotBand]=\"plotBand\"\n [scale]=\"data.scales.x.get(i).scale\"\n [size]=\"data.visibleRect\"\n [axis]=\"data.scales.x.get(i)\"></g>\n </ng-container>\n </g>\n <g class=\"y-axis-plotband-container\">\n <ng-container *ngFor=\"let axis of data.config.yAxis; let i = index\">\n <g teta-plot-band *ngFor=\"let plotBand of axis.plotBands\"\n [plotBand]=\"plotBand\"\n [scale]=\"data.scales.y.get(i).scale\"\n [size]=\"data.visibleRect\"\n [axis]=\"data.scales.y.get(i)\"></g>\n </ng-container>\n </g>\n <g class=\"x-axis-plotline-container\">\n <ng-container *ngFor=\"let axis of data.config.xAxis; let i = index\">\n <g teta-plot-line *ngFor=\"let plotLine of axis.plotLines\"\n [plotLine]=\"plotLine\"\n [scale]=\"data.scales.x.get(i).scale\"\n [size]=\"data.size\"\n [axis]=\"data.scales.x.get(i)\"></g>\n </ng-container>\n </g>\n <g class=\"y-axis-plotline-container\">\n <ng-container *ngFor=\"let axis of data.config.yAxis; let i = index\">\n <g teta-plot-line *ngFor=\"let plotLine of axis.plotLines\"\n [plotLine]=\"plotLine\"\n [scale]=\"data.scales.y.get(i).scale\"\n [size]=\"data.size\"\n [axis]=\"data.scales.y.get(i)\"></g>\n </ng-container>\n </g>\n <g class=\"series-container\">\n <ng-container *ngFor=\"let series of data.config.series;\">\n <g teta-series-host\n *ngIf=\"series.visible\"\n [config]=\"data.config\"\n [series]=\"series\"></g>\n </ng-container>\n </g>\n <g class=\"annotations\">\n <g teta-annotation\n [visibleRect]=\"data.visibleRect\"\n *ngFor=\"let annotation of data.config.annotations\"\n [annotation]=\"annotation\"></g>\n </g>\n <g class=\"crosshair\" *ngIf=\"data.config.tooltip?.showCrosshair\">\n <g teta-crosshair [size]=\"data.visibleRect\"></g>\n </g>\n </svg>\n\n </ng-container>\n</ng-container>\n", styles: [":host{display:flex;flex-direction:column;flex-grow:1;min-width:0;min-height:0}:host .zoomable:hover{cursor:grab}:host .zoomable:active{cursor:grabbing}:host .crosshair{cursor:crosshair}\n"] }]
|
|
2724
2939
|
}], ctorParameters: function () { return [{ type: ChartService }, { type: i0.ChangeDetectorRef }, { type: ScaleService }, { type: ZoomService }, { type: i0.ElementRef }, { type: i0.NgZone }]; } });
|
|
2725
2940
|
|
|
2726
2941
|
class LegendComponent {
|
|
2942
|
+
chartService;
|
|
2943
|
+
sizeMapping = new Map()
|
|
2944
|
+
.set(SeriesType.line, 2)
|
|
2945
|
+
.set(SeriesType.scatter, 2)
|
|
2946
|
+
.set(SeriesType.bar, 12)
|
|
2947
|
+
.set(SeriesType.area, 2)
|
|
2948
|
+
.set(SeriesType.block, 12)
|
|
2949
|
+
.set(SeriesType.blockArea, 2);
|
|
2950
|
+
series;
|
|
2951
|
+
classLegend = true;
|
|
2727
2952
|
constructor(chartService) {
|
|
2728
2953
|
this.chartService = chartService;
|
|
2729
|
-
this.sizeMapping = new Map()
|
|
2730
|
-
.set(SeriesType.line, 2)
|
|
2731
|
-
.set(SeriesType.scatter, 2)
|
|
2732
|
-
.set(SeriesType.bar, 12)
|
|
2733
|
-
.set(SeriesType.area, 2)
|
|
2734
|
-
.set(SeriesType.block, 12)
|
|
2735
|
-
.set(SeriesType.blockArea, 2);
|
|
2736
|
-
this.classLegend = true;
|
|
2737
2954
|
}
|
|
2738
2955
|
getHeight(serie) {
|
|
2739
2956
|
return this.sizeMapping.get(serie.type ?? SeriesType.line);
|
|
@@ -2741,10 +2958,10 @@ class LegendComponent {
|
|
|
2741
2958
|
click(serie) {
|
|
2742
2959
|
this.chartService.toggleVisibilitySeries([serie.id]);
|
|
2743
2960
|
}
|
|
2961
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: LegendComponent, deps: [{ token: ChartService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2962
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: LegendComponent, selector: "teta-legend", inputs: { series: "series" }, host: { properties: { "class.padding-bottom-4": "this.classLegend" } }, ngImport: i0, template: "<ng-container *ngFor=\"let serie of series\" class=\"padding-bottom-4\">\n <div *ngIf=\"serie?.showInLegend !== false\">\n <div class=\"legend-item cursor-pointer\" (click)=\"click(serie)\">\n <div class=\"legend-icon-form\"\n [style.height.px]=\"getHeight(serie)\"\n [style.border-top-color]=\"serie.visible ? serie.color : 'var(--color-text-30)'\"\n [style.border-top-style]=\"serie.style?.strokeDasharray ? 'dashed' : 'solid'\"\n [style.border-width.px]=\"serie.style?.strokeDasharray ? 1 : 2\"></div>\n <div class=\"legend-label\" style=\"user-select: none\" [style.text-decoration]=\"serie.visible ? 'none' : 'line-through'\">{{ serie.name }}</div>\n </div>\n </div>\n</ng-container>\n", styles: [":host{display:flex;grid-gap:8px;flex-wrap:wrap;align-items:center;justify-content:space-evenly}:host .legend-item{display:flex;align-items:center}:host .legend-icon-form{width:12px}:host .legend-label{margin-left:5px}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2744
2963
|
}
|
|
2745
|
-
|
|
2746
|
-
LegendComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: LegendComponent, selector: "teta-legend", inputs: { series: "series" }, host: { properties: { "class.padding-bottom-4": "this.classLegend" } }, ngImport: i0, template: "<ng-container *ngFor=\"let serie of series\" class=\"padding-bottom-4\">\n <div *ngIf=\"serie?.showInLegend !== false\">\n <div class=\"legend-item cursor-pointer\" (click)=\"click(serie)\">\n <div class=\"legend-icon-form\"\n [style.height.px]=\"getHeight(serie)\"\n [style.border-top-color]=\"serie.visible ? serie.color : 'var(--color-text-30)'\"\n [style.border-top-style]=\"serie.style?.strokeDasharray ? 'dashed' : 'solid'\"\n [style.border-width.px]=\"serie.style?.strokeDasharray ? 1 : 2\"></div>\n <div class=\"legend-label\" style=\"user-select: none\" [style.text-decoration]=\"serie.visible ? 'none' : 'line-through'\">{{ serie.name }}</div>\n </div>\n </div>\n</ng-container>\n", styles: [":host{display:flex;grid-gap:8px;flex-wrap:wrap;align-items:center;justify-content:space-evenly}:host .legend-item{display:flex;align-items:center}:host .legend-icon-form{width:12px}:host .legend-label{margin-left:5px}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2747
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: LegendComponent, decorators: [{
|
|
2964
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: LegendComponent, decorators: [{
|
|
2748
2965
|
type: Component,
|
|
2749
2966
|
args: [{ selector: 'teta-legend', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngFor=\"let serie of series\" class=\"padding-bottom-4\">\n <div *ngIf=\"serie?.showInLegend !== false\">\n <div class=\"legend-item cursor-pointer\" (click)=\"click(serie)\">\n <div class=\"legend-icon-form\"\n [style.height.px]=\"getHeight(serie)\"\n [style.border-top-color]=\"serie.visible ? serie.color : 'var(--color-text-30)'\"\n [style.border-top-style]=\"serie.style?.strokeDasharray ? 'dashed' : 'solid'\"\n [style.border-width.px]=\"serie.style?.strokeDasharray ? 1 : 2\"></div>\n <div class=\"legend-label\" style=\"user-select: none\" [style.text-decoration]=\"serie.visible ? 'none' : 'line-through'\">{{ serie.name }}</div>\n </div>\n </div>\n</ng-container>\n", styles: [":host{display:flex;grid-gap:8px;flex-wrap:wrap;align-items:center;justify-content:space-evenly}:host .legend-item{display:flex;align-items:center}:host .legend-icon-form{width:12px}:host .legend-label{margin-left:5px}\n"] }]
|
|
2750
2967
|
}], ctorParameters: function () { return [{ type: ChartService }]; }, propDecorators: { series: [{
|
|
@@ -2755,38 +2972,41 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
2755
2972
|
}] } });
|
|
2756
2973
|
|
|
2757
2974
|
class ChartComponent {
|
|
2975
|
+
chartService;
|
|
2976
|
+
zoomService;
|
|
2977
|
+
brushService;
|
|
2978
|
+
scaleService;
|
|
2979
|
+
hasSeriesData;
|
|
2980
|
+
svcConfig;
|
|
2981
|
+
pointerMove = new EventEmitter();
|
|
2982
|
+
plotBandsMove = new EventEmitter();
|
|
2983
|
+
plotBandClick = new EventEmitter();
|
|
2984
|
+
plotBandContextMenu = new EventEmitter();
|
|
2985
|
+
plotLinesMove = new EventEmitter();
|
|
2986
|
+
pointMove = new EventEmitter();
|
|
2987
|
+
chartClick = new EventEmitter();
|
|
2988
|
+
chartContextMenu = new EventEmitter();
|
|
2989
|
+
annotationContextMenu = new EventEmitter();
|
|
2990
|
+
annotationClick = new EventEmitter();
|
|
2991
|
+
annotationMove = new EventEmitter();
|
|
2992
|
+
zoomServiceInstance = new EventEmitter();
|
|
2993
|
+
brushServiceInstance = new EventEmitter();
|
|
2994
|
+
set config(config) {
|
|
2995
|
+
this.chartService.setConfig(config);
|
|
2996
|
+
this.zoomService.setBroadcastChannel(config?.zoom?.syncChannel);
|
|
2997
|
+
}
|
|
2998
|
+
_alive = true;
|
|
2758
2999
|
constructor(chartService, zoomService, brushService, scaleService) {
|
|
2759
3000
|
this.chartService = chartService;
|
|
2760
3001
|
this.zoomService = zoomService;
|
|
2761
3002
|
this.brushService = brushService;
|
|
2762
3003
|
this.scaleService = scaleService;
|
|
2763
|
-
this.pointerMove = new EventEmitter();
|
|
2764
|
-
this.plotBandsMove = new EventEmitter();
|
|
2765
|
-
this.plotBandClick = new EventEmitter();
|
|
2766
|
-
this.plotBandContextMenu = new EventEmitter();
|
|
2767
|
-
this.plotLinesMove = new EventEmitter();
|
|
2768
|
-
this.pointMove = new EventEmitter();
|
|
2769
|
-
this.chartClick = new EventEmitter();
|
|
2770
|
-
this.chartContextMenu = new EventEmitter();
|
|
2771
|
-
this.annotationContextMenu = new EventEmitter();
|
|
2772
|
-
this.annotationClick = new EventEmitter();
|
|
2773
|
-
this.annotationMove = new EventEmitter();
|
|
2774
|
-
this.zoomServiceInstance = new EventEmitter();
|
|
2775
|
-
this.brushServiceInstance = new EventEmitter();
|
|
2776
|
-
this._alive = true;
|
|
2777
3004
|
this.svcConfig = this.chartService.config;
|
|
2778
3005
|
this.hasSeriesData = this.svcConfig.pipe(map((_) => _.series?.length > 0 && _.series?.some((_) => _.data?.length > 0)));
|
|
2779
3006
|
}
|
|
2780
|
-
set config(config) {
|
|
2781
|
-
this.chartService.setConfig(config);
|
|
2782
|
-
this.zoomService.setBroadcastChannel(config?.zoom?.syncChannel);
|
|
2783
|
-
}
|
|
2784
3007
|
resetZoom() {
|
|
2785
3008
|
this.scaleService.resetZoom();
|
|
2786
3009
|
}
|
|
2787
|
-
// setZoom() {
|
|
2788
|
-
// this.zoomService.fireZoom()
|
|
2789
|
-
// }
|
|
2790
3010
|
ngOnChanges(changes) {
|
|
2791
3011
|
}
|
|
2792
3012
|
ngOnInit() {
|
|
@@ -2874,10 +3094,10 @@ class ChartComponent {
|
|
|
2874
3094
|
ngOnDestroy() {
|
|
2875
3095
|
this._alive = false;
|
|
2876
3096
|
}
|
|
3097
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ChartComponent, deps: [{ token: ChartService }, { token: ZoomService }, { token: BrushService }, { token: ScaleService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3098
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: ChartComponent, selector: "teta-svg-chart", inputs: { config: "config" }, outputs: { pointerMove: "pointerMove", plotBandsMove: "plotBandsMove", plotBandClick: "plotBandClick", plotBandContextMenu: "plotBandContextMenu", plotLinesMove: "plotLinesMove", pointMove: "pointMove", chartClick: "chartClick", chartContextMenu: "chartContextMenu", annotationContextMenu: "annotationContextMenu", annotationClick: "annotationClick", annotationMove: "annotationMove", zoomServiceInstance: "zoomServiceInstance", brushServiceInstance: "brushServiceInstance" }, providers: [ChartService, ZoomService, ScaleService, BrushService], usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"{\n hasSeriesData: hasSeriesData | async,\n svcConfig: svcConfig | async\n} as data\">\n <ng-container *ngIf=\"data.hasSeriesData === true else noData\">\n <div class=\"column column_auto\">\n <teta-chart-container class=\"chart-container position-relative\"></teta-chart-container>\n </div>\n <teta-legend *ngIf=\"data.svcConfig.legend?.enable === true\" [series]=\"data.svcConfig.series\"></teta-legend>\n </ng-container>\n</ng-container>\n<ng-template #noData>\n <div class=\"column column_auto justify-content-center\">\n <span class=\"font-body-3 color-text-40 overflow-hidden text-overflow-ellipsis nowrap text-align-center\">\n <div #ref><ng-content></ng-content></div>\n <span *ngIf=\"!ref.hasChildNodes()\">\n No data\n </span>\n </span>\n </div>\n</ng-template>\n", styles: [":host{position:relative;display:flex;flex-direction:column;height:100%;width:100%}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ChartContainerComponent, selector: "teta-chart-container" }, { kind: "component", type: LegendComponent, selector: "teta-legend", inputs: ["series"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2877
3099
|
}
|
|
2878
|
-
|
|
2879
|
-
ChartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: ChartComponent, selector: "teta-svg-chart", inputs: { config: "config" }, outputs: { pointerMove: "pointerMove", plotBandsMove: "plotBandsMove", plotBandClick: "plotBandClick", plotBandContextMenu: "plotBandContextMenu", plotLinesMove: "plotLinesMove", pointMove: "pointMove", chartClick: "chartClick", chartContextMenu: "chartContextMenu", annotationContextMenu: "annotationContextMenu", annotationClick: "annotationClick", annotationMove: "annotationMove", zoomServiceInstance: "zoomServiceInstance", brushServiceInstance: "brushServiceInstance" }, providers: [ChartService, ZoomService, ScaleService, BrushService], usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"{\n hasSeriesData: hasSeriesData | async,\n svcConfig: svcConfig | async\n} as data\">\n <ng-container *ngIf=\"data.hasSeriesData === true else noData\">\n <div class=\"column column_auto\">\n <teta-chart-container class=\"chart-container position-relative\"></teta-chart-container>\n </div>\n <teta-legend *ngIf=\"data.svcConfig.legend?.enable === true\" [series]=\"data.svcConfig.series\"></teta-legend>\n </ng-container>\n</ng-container>\n<ng-template #noData>\n <div class=\"column column_auto justify-content-center\">\n <span class=\"font-body-3 color-text-40 overflow-hidden text-overflow-ellipsis nowrap text-align-center\">\n <div #ref><ng-content></ng-content></div>\n <span *ngIf=\"!ref.hasChildNodes()\">\n No data\n </span>\n </span>\n </div>\n</ng-template>\n", styles: [":host{position:relative;display:flex;flex-direction:column;height:100%;width:100%}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ChartContainerComponent, selector: "teta-chart-container" }, { kind: "component", type: LegendComponent, selector: "teta-legend", inputs: ["series"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2880
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: ChartComponent, decorators: [{
|
|
3100
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ChartComponent, decorators: [{
|
|
2881
3101
|
type: Component,
|
|
2882
3102
|
args: [{ selector: 'teta-svg-chart', providers: [ChartService, ZoomService, ScaleService, BrushService], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"{\n hasSeriesData: hasSeriesData | async,\n svcConfig: svcConfig | async\n} as data\">\n <ng-container *ngIf=\"data.hasSeriesData === true else noData\">\n <div class=\"column column_auto\">\n <teta-chart-container class=\"chart-container position-relative\"></teta-chart-container>\n </div>\n <teta-legend *ngIf=\"data.svcConfig.legend?.enable === true\" [series]=\"data.svcConfig.series\"></teta-legend>\n </ng-container>\n</ng-container>\n<ng-template #noData>\n <div class=\"column column_auto justify-content-center\">\n <span class=\"font-body-3 color-text-40 overflow-hidden text-overflow-ellipsis nowrap text-align-center\">\n <div #ref><ng-content></ng-content></div>\n <span *ngIf=\"!ref.hasChildNodes()\">\n No data\n </span>\n </span>\n </div>\n</ng-template>\n", styles: [":host{position:relative;display:flex;flex-direction:column;height:100%;width:100%}\n"] }]
|
|
2883
3103
|
}], ctorParameters: function () { return [{ type: ChartService }, { type: ZoomService }, { type: BrushService }, { type: ScaleService }]; }, propDecorators: { pointerMove: [{
|
|
@@ -2911,6 +3131,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
2911
3131
|
}] } });
|
|
2912
3132
|
|
|
2913
3133
|
class BandseriesComponent extends SeriesBaseComponent {
|
|
3134
|
+
svc;
|
|
3135
|
+
cdr;
|
|
3136
|
+
scaleService;
|
|
3137
|
+
zoomService;
|
|
3138
|
+
element;
|
|
3139
|
+
x;
|
|
3140
|
+
y;
|
|
2914
3141
|
constructor(svc, cdr, scaleService, zoomService, element) {
|
|
2915
3142
|
super(svc, cdr, scaleService, zoomService, element);
|
|
2916
3143
|
this.svc = svc;
|
|
@@ -2923,51 +3150,51 @@ class BandseriesComponent extends SeriesBaseComponent {
|
|
|
2923
3150
|
this.x = this.scaleService.scales.pipe(map(_ => _.x.get(this.series.xAxisIndex)?.scale));
|
|
2924
3151
|
this.y = this.scaleService.scales.pipe(map(_ => _.y.get(this.series.yAxisIndex)?.scale));
|
|
2925
3152
|
}
|
|
3153
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: BandseriesComponent, deps: [{ token: ChartService }, { token: i0.ChangeDetectorRef }, { token: ScaleService }, { token: ZoomService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3154
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: BandseriesComponent, selector: "svg:svg[teta-bandseries]", usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"{x: x | async, y: y | async} as scales\">\n <ng-container *ngFor=\"let band of _series.data\">\n <svg:rect [attr.x]=\"scales.x(band.x)\"\n [attr.y]=\"scales.y(band.y) - scales.y.bandwidth() / 2\"\n [attr.width]=\"scales.x(band.x1) - scales.x(band.x)\"\n fill=\"red\"\n [attr.height]=\"scales.y.bandwidth()\">\n </svg:rect>\n <svg:text\n text-anchor=\"middle\"\n dominant-baseline=\"middle\"\n class=\"label font-caption fill-text-90\"\n [attr.x]=\"scales.x(band.x) + (scales.x(band.x1) - scales.x(band.x)) / 2\"\n [attr.y]=\"scales.y(band.y)\">{{band.y}}\n </svg:text>\n </ng-container>\n\n</ng-container>\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }] });
|
|
2926
3155
|
}
|
|
2927
|
-
|
|
2928
|
-
BandseriesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: BandseriesComponent, selector: "svg:svg[teta-bandseries]", usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"{x: x | async, y: y | async} as scales\">\n <ng-container *ngFor=\"let band of _series.data\">\n <svg:rect [attr.x]=\"scales.x(band.x)\"\n [attr.y]=\"scales.y(band.y) - scales.y.bandwidth() / 2\"\n [attr.width]=\"scales.x(band.x1) - scales.x(band.x)\"\n fill=\"red\"\n [attr.height]=\"scales.y.bandwidth()\">\n </svg:rect>\n <svg:text\n text-anchor=\"middle\"\n dominant-baseline=\"middle\"\n class=\"label font-caption fill-text-90\"\n [attr.x]=\"scales.x(band.x) + (scales.x(band.x1) - scales.x(band.x)) / 2\"\n [attr.y]=\"scales.y(band.y)\">{{band.y}}\n </svg:text>\n </ng-container>\n\n</ng-container>\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }] });
|
|
2929
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: BandseriesComponent, decorators: [{
|
|
3156
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: BandseriesComponent, decorators: [{
|
|
2930
3157
|
type: Component,
|
|
2931
3158
|
args: [{ selector: 'svg:svg[teta-bandseries]', template: "<ng-container *ngIf=\"{x: x | async, y: y | async} as scales\">\n <ng-container *ngFor=\"let band of _series.data\">\n <svg:rect [attr.x]=\"scales.x(band.x)\"\n [attr.y]=\"scales.y(band.y) - scales.y.bandwidth() / 2\"\n [attr.width]=\"scales.x(band.x1) - scales.x(band.x)\"\n fill=\"red\"\n [attr.height]=\"scales.y.bandwidth()\">\n </svg:rect>\n <svg:text\n text-anchor=\"middle\"\n dominant-baseline=\"middle\"\n class=\"label font-caption fill-text-90\"\n [attr.x]=\"scales.x(band.x) + (scales.x(band.x1) - scales.x(band.x)) / 2\"\n [attr.y]=\"scales.y(band.y)\">{{band.y}}\n </svg:text>\n </ng-container>\n\n</ng-container>\n" }]
|
|
2932
3159
|
}], ctorParameters: function () { return [{ type: ChartService }, { type: i0.ChangeDetectorRef }, { type: ScaleService }, { type: ZoomService }, { type: i0.ElementRef }]; } });
|
|
2933
3160
|
|
|
2934
3161
|
class ChartModule {
|
|
3162
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ChartModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3163
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.4", ngImport: i0, type: ChartModule, declarations: [ChartComponent,
|
|
3164
|
+
SeriesHostComponent,
|
|
3165
|
+
ChartContainerComponent,
|
|
3166
|
+
LegendComponent,
|
|
3167
|
+
SeriesBaseComponent,
|
|
3168
|
+
LinearSeriesBase,
|
|
3169
|
+
LineSeriesComponent,
|
|
3170
|
+
GridlinesComponent,
|
|
3171
|
+
XAxisComponent,
|
|
3172
|
+
YAxisComponent,
|
|
3173
|
+
PlotlineComponent,
|
|
3174
|
+
PlotBandComponent,
|
|
3175
|
+
BarSeriesComponent,
|
|
3176
|
+
TooltipComponent,
|
|
3177
|
+
ZoomableDirective,
|
|
3178
|
+
BrushableDirective,
|
|
3179
|
+
AreaSeriesComponent,
|
|
3180
|
+
ScatterSeriesComponent,
|
|
3181
|
+
BlockSeriesComponent,
|
|
3182
|
+
BlockAreaSeriesComponent,
|
|
3183
|
+
AnnotationComponent,
|
|
3184
|
+
CrosshairComponent,
|
|
3185
|
+
DraggablePointDirective,
|
|
3186
|
+
BandseriesComponent], imports: [CommonModule, LetModule], exports: [ChartComponent,
|
|
3187
|
+
LegendComponent,
|
|
3188
|
+
SeriesBaseComponent,
|
|
3189
|
+
LineSeriesComponent,
|
|
3190
|
+
BarSeriesComponent,
|
|
3191
|
+
ScatterSeriesComponent,
|
|
3192
|
+
AreaSeriesComponent,
|
|
3193
|
+
BlockSeriesComponent,
|
|
3194
|
+
BlockAreaSeriesComponent] });
|
|
3195
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ChartModule, imports: [CommonModule, LetModule] });
|
|
2935
3196
|
}
|
|
2936
|
-
|
|
2937
|
-
ChartModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: ChartModule, declarations: [ChartComponent,
|
|
2938
|
-
SeriesHostComponent,
|
|
2939
|
-
ChartContainerComponent,
|
|
2940
|
-
LegendComponent,
|
|
2941
|
-
SeriesBaseComponent,
|
|
2942
|
-
LinearSeriesBase,
|
|
2943
|
-
LineSeriesComponent,
|
|
2944
|
-
GridlinesComponent,
|
|
2945
|
-
XAxisComponent,
|
|
2946
|
-
YAxisComponent,
|
|
2947
|
-
PlotlineComponent,
|
|
2948
|
-
PlotBandComponent,
|
|
2949
|
-
BarSeriesComponent,
|
|
2950
|
-
TooltipComponent,
|
|
2951
|
-
ZoomableDirective,
|
|
2952
|
-
BrushableDirective,
|
|
2953
|
-
AreaSeriesComponent,
|
|
2954
|
-
ScatterSeriesComponent,
|
|
2955
|
-
BlockSeriesComponent,
|
|
2956
|
-
BlockAreaSeriesComponent,
|
|
2957
|
-
AnnotationComponent,
|
|
2958
|
-
CrosshairComponent,
|
|
2959
|
-
DraggablePointDirective,
|
|
2960
|
-
BandseriesComponent], imports: [CommonModule, LetModule], exports: [ChartComponent,
|
|
2961
|
-
LegendComponent,
|
|
2962
|
-
SeriesBaseComponent,
|
|
2963
|
-
LineSeriesComponent,
|
|
2964
|
-
BarSeriesComponent,
|
|
2965
|
-
ScatterSeriesComponent,
|
|
2966
|
-
AreaSeriesComponent,
|
|
2967
|
-
BlockSeriesComponent,
|
|
2968
|
-
BlockAreaSeriesComponent] });
|
|
2969
|
-
ChartModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: ChartModule, imports: [CommonModule, LetModule] });
|
|
2970
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: ChartModule, decorators: [{
|
|
3197
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ChartModule, decorators: [{
|
|
2971
3198
|
type: NgModule,
|
|
2972
3199
|
args: [{
|
|
2973
3200
|
declarations: [
|
|
@@ -3012,6 +3239,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
3012
3239
|
}] });
|
|
3013
3240
|
|
|
3014
3241
|
class PlotBand {
|
|
3242
|
+
id;
|
|
3243
|
+
name;
|
|
3244
|
+
from;
|
|
3245
|
+
to;
|
|
3246
|
+
label;
|
|
3247
|
+
showGrabbers;
|
|
3248
|
+
draggable;
|
|
3249
|
+
resizable;
|
|
3250
|
+
min;
|
|
3251
|
+
max;
|
|
3252
|
+
style;
|
|
3015
3253
|
constructor(options) {
|
|
3016
3254
|
this.id = options?.id;
|
|
3017
3255
|
this.name = options?.name;
|
|
@@ -3029,6 +3267,14 @@ class PlotBand {
|
|
|
3029
3267
|
}
|
|
3030
3268
|
|
|
3031
3269
|
class PlotLine {
|
|
3270
|
+
id;
|
|
3271
|
+
name;
|
|
3272
|
+
value;
|
|
3273
|
+
label;
|
|
3274
|
+
min;
|
|
3275
|
+
max;
|
|
3276
|
+
draggable;
|
|
3277
|
+
style;
|
|
3032
3278
|
constructor(options) {
|
|
3033
3279
|
this.id = options?.id;
|
|
3034
3280
|
this.name = options?.name;
|