@tetacom/svg-charts 1.7.25 → 1.7.27
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.
|
@@ -1846,7 +1846,7 @@ class LinearSeriesBaseComponent extends SeriesBaseComponent {
|
|
|
1846
1846
|
if (x0 instanceof Date) {
|
|
1847
1847
|
x0 = x0.getTime();
|
|
1848
1848
|
}
|
|
1849
|
-
const rightId = bisect(this.series().data, x0);
|
|
1849
|
+
const rightId = bisect([...this.series().data.sort((a, b) => a.x - b.x)], x0);
|
|
1850
1850
|
const range = scaleY.range();
|
|
1851
1851
|
const intersect = lineIntersection(pointer, range[0], pointer, Number.MAX_SAFE_INTEGER, scaleX(this.series().data[rightId - 1]?.x), scaleY(this.series().data[rightId - 1]?.y), scaleX(this.series().data[rightId]?.x), scaleY(this.series().data[rightId]?.y));
|
|
1852
1852
|
const x = scaleX.invert(intersect.x);
|
|
@@ -1877,7 +1877,7 @@ class LinearSeriesBaseComponent extends SeriesBaseComponent {
|
|
|
1877
1877
|
if (y0 instanceof Date) {
|
|
1878
1878
|
y0 = y0.getTime();
|
|
1879
1879
|
}
|
|
1880
|
-
const rightId = bisect(this.series().data, y0);
|
|
1880
|
+
const rightId = bisect([...this.series().data.sort((a, b) => a.y - b.y)], y0);
|
|
1881
1881
|
const range = scaleX.range();
|
|
1882
1882
|
const intersect = lineIntersection(range[0], mouse[1], Number.MAX_SAFE_INTEGER, mouse[1], scaleX(this.series().data[rightId - 1]?.x), scaleY(this.series().data[rightId - 1]?.y), scaleX(this.series().data[rightId]?.x), scaleY(this.series().data[rightId]?.y));
|
|
1883
1883
|
const x = scaleX.invert(intersect.x);
|
|
@@ -2765,7 +2765,7 @@ class SeriesControlsComponent {
|
|
|
2765
2765
|
clear() {
|
|
2766
2766
|
this.dialogService
|
|
2767
2767
|
.confirm({
|
|
2768
|
-
title: this.translocoService.translate('
|
|
2768
|
+
title: this.translocoService.translate('charts.confirm_settings_reset'),
|
|
2769
2769
|
})
|
|
2770
2770
|
.subscribe((result) => {
|
|
2771
2771
|
if (result) {
|