@tetacom/svg-charts 1.7.7 → 1.7.8
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.
|
@@ -26,12 +26,12 @@ export declare class PlotBandComponent implements AfterViewInit, OnDestroy {
|
|
|
26
26
|
from: import("@angular/core").Signal<any>;
|
|
27
27
|
to: import("@angular/core").Signal<any>;
|
|
28
28
|
bandSize: import("@angular/core").Signal<number>;
|
|
29
|
+
textPosition: import("@angular/core").Signal<any>;
|
|
30
|
+
fill: import("@angular/core").Signal<string>;
|
|
29
31
|
constructor(chartService: ChartService, element: ElementRef);
|
|
30
32
|
emit(event: IChartEvent<PlotBand>): void;
|
|
31
33
|
ngAfterViewInit(): void;
|
|
32
34
|
ngOnDestroy(): void;
|
|
33
|
-
textPosition: import("@angular/core").Signal<any>;
|
|
34
|
-
fill: import("@angular/core").Signal<string>;
|
|
35
35
|
static ɵfac: i0.ɵɵFactoryDeclaration<PlotBandComponent, never>;
|
|
36
36
|
static ɵcmp: i0.ɵɵComponentDeclaration<PlotBandComponent, "[teta-plot-band]", never, { "plotBand": { "alias": "plotBand"; "required": false; "isSignal": true; }; "axis": { "alias": "axis"; "required": false; "isSignal": true; }; "scale": { "alias": "scale"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
37
37
|
}
|
|
@@ -1493,7 +1493,10 @@ class PlotBandComponent {
|
|
|
1493
1493
|
this.axis = input();
|
|
1494
1494
|
this.scale = input();
|
|
1495
1495
|
this.size = input();
|
|
1496
|
-
this.fromTo = signal(
|
|
1496
|
+
this.fromTo = signal({
|
|
1497
|
+
from: 0,
|
|
1498
|
+
to: 0,
|
|
1499
|
+
});
|
|
1497
1500
|
this.orientation = AxisOrientation;
|
|
1498
1501
|
this.height = computed(() => {
|
|
1499
1502
|
return this.size().height;
|
|
@@ -1502,13 +1505,22 @@ class PlotBandComponent {
|
|
|
1502
1505
|
return this.size().width;
|
|
1503
1506
|
});
|
|
1504
1507
|
this.from = computed(() => {
|
|
1505
|
-
|
|
1508
|
+
if (this.scale() && this.fromTo()) {
|
|
1509
|
+
return this.scale()(this.fromTo().from);
|
|
1510
|
+
}
|
|
1511
|
+
return 0;
|
|
1506
1512
|
});
|
|
1507
1513
|
this.to = computed(() => {
|
|
1508
|
-
|
|
1514
|
+
if (this.scale() && this.fromTo()) {
|
|
1515
|
+
return this.scale()(this.fromTo().to);
|
|
1516
|
+
}
|
|
1517
|
+
return 0;
|
|
1509
1518
|
});
|
|
1510
1519
|
this.bandSize = computed(() => {
|
|
1511
|
-
|
|
1520
|
+
if (this.scale() && this.fromTo()) {
|
|
1521
|
+
return Math.abs(this.scale()(this.fromTo().to) - this.scale()(this.fromTo().from));
|
|
1522
|
+
}
|
|
1523
|
+
return 0;
|
|
1512
1524
|
});
|
|
1513
1525
|
this.textPosition = computed(() => {
|
|
1514
1526
|
let [min, max] = this.scale().domain();
|