From 8e304fc6eb04393a6172d376d8f2fa8703175bd6 Mon Sep 17 00:00:00 2001 From: Mark van der Wal Date: Thu, 23 Nov 2023 21:13:44 +0100 Subject: [PATCH 1/5] also use scale for histogram --- .../histogram-details.component.html | 10 +++++----- .../histogram-details/histogram-details.component.ts | 11 +++++++++++ .../fm-map/components/legend/legend.component.html | 2 +- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/projects/common-map/src/fm-map/components/legend/histogram-details/histogram-details.component.html b/projects/common-map/src/fm-map/components/legend/histogram-details/histogram-details.component.html index 210a026..16bc3d0 100644 --- a/projects/common-map/src/fm-map/components/legend/histogram-details/histogram-details.component.html +++ b/projects/common-map/src/fm-map/components/legend/histogram-details/histogram-details.component.html @@ -1,15 +1,15 @@
Average:
-
{{histogram.mean| number:'1.0-2'}}
+
{{ getScaledValue(histogram.mean| number:'1.0-2')}}
Standard deviation:
-
{{histogram.stddev| number:'1.0-2'}}
+
{{ getScaledValue(histogram.stddev| number:'1.0-2')}}
Min:
-
{{histogram.min| number:'1.0-2'}}
+
{{ getScaledValue(histogram.min| number:'1.0-2')}}
Max:
-
{{histogram.max| number:'1.0-2'}}
+
{{ getScaledValue(histogram.max| number:'1.0-2')}}
Confidence interval:
-
{{histogram.confidence * 100| number:'1.0-0'}}%
+
{{ getScaledValue(histogram.confidence * 100)| number:'1.0-0'}}%
diff --git a/projects/common-map/src/fm-map/components/legend/histogram-details/histogram-details.component.ts b/projects/common-map/src/fm-map/components/legend/histogram-details/histogram-details.component.ts index e02a0cf..29cfa8e 100644 --- a/projects/common-map/src/fm-map/components/legend/histogram-details/histogram-details.component.ts +++ b/projects/common-map/src/fm-map/components/legend/histogram-details/histogram-details.component.ts @@ -14,6 +14,17 @@ export class HistogramDetailsComponent { @Input() histogram: IHistogram; + @Input() + scale: number | null; + + public getScaledValue(value: number): number { + let v = value; + if (this.scale && this.scale != 0) { + v = this.scale * value; + } + return v; + } + showConfidenceInterval(): boolean { return this.histogram.confidence != null && this.histogram.confidence !== 1; } diff --git a/projects/common-map/src/fm-map/components/legend/legend.component.html b/projects/common-map/src/fm-map/components/legend/legend.component.html index e30e66a..f81496d 100644 --- a/projects/common-map/src/fm-map/components/legend/legend.component.html +++ b/projects/common-map/src/fm-map/components/legend/legend.component.html @@ -35,7 +35,7 @@ - + From 187811e4e2af77d08c8769b6bd90b7c54d42f837 Mon Sep 17 00:00:00 2001 From: Mark van der Wal Date: Sat, 25 Nov 2023 15:41:39 +0100 Subject: [PATCH 2/5] upped version --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 469ce12..e5bb8f9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "farmmaps-lib-app", - "version": "4.0.0", + "version": "4.0.1", "scripts": { "ng": "ng", "start": "ng serve", @@ -86,4 +86,4 @@ "ts-node": "^8.8.1", "typescript": "~4.6.4" } -} \ No newline at end of file +} From 8fd8675260fa74f3869fff9ec1f176fc3749a88b Mon Sep 17 00:00:00 2001 From: Mark van der Wal Date: Sat, 25 Nov 2023 15:46:31 +0100 Subject: [PATCH 3/5] AW-5366 fix scaling of histogram --- package.json | 2 +- .../histogram-details/histogram-details.component.html | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index e5bb8f9..3042e5d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "farmmaps-lib-app", - "version": "4.0.1", + "version": "4.0.2", "scripts": { "ng": "ng", "start": "ng serve", diff --git a/projects/common-map/src/fm-map/components/legend/histogram-details/histogram-details.component.html b/projects/common-map/src/fm-map/components/legend/histogram-details/histogram-details.component.html index 16bc3d0..59500bd 100644 --- a/projects/common-map/src/fm-map/components/legend/histogram-details/histogram-details.component.html +++ b/projects/common-map/src/fm-map/components/legend/histogram-details/histogram-details.component.html @@ -1,12 +1,12 @@
Average:
-
{{ getScaledValue(histogram.mean| number:'1.0-2')}}
+
{{ getScaledValue(histogram.mean)| number:'1.0-2')}}
Standard deviation:
-
{{ getScaledValue(histogram.stddev| number:'1.0-2')}}
+
{{ getScaledValue(histogram.stddev)| number:'1.0-2')}}
Min:
-
{{ getScaledValue(histogram.min| number:'1.0-2')}}
+
{{ getScaledValue(histogram.min)| number:'1.0-2')}}
Max:
-
{{ getScaledValue(histogram.max| number:'1.0-2')}}
+
{{ getScaledValue(histogram.max)| number:'1.0-2')}}
Confidence interval:
From 03e3c7ad95b53b933c1d5211f1bb33535d9d0d8a Mon Sep 17 00:00:00 2001 From: Mark van der Wal Date: Sat, 25 Nov 2023 15:52:47 +0100 Subject: [PATCH 4/5] fix build... --- .../histogram-details/histogram-details.component.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/projects/common-map/src/fm-map/components/legend/histogram-details/histogram-details.component.html b/projects/common-map/src/fm-map/components/legend/histogram-details/histogram-details.component.html index 59500bd..34c8a54 100644 --- a/projects/common-map/src/fm-map/components/legend/histogram-details/histogram-details.component.html +++ b/projects/common-map/src/fm-map/components/legend/histogram-details/histogram-details.component.html @@ -1,12 +1,12 @@
Average:
-
{{ getScaledValue(histogram.mean)| number:'1.0-2')}}
+
{{ getScaledValue(histogram.mean)| number:'1.0-2'}}
Standard deviation:
-
{{ getScaledValue(histogram.stddev)| number:'1.0-2')}}
+
{{ getScaledValue(histogram.stddev)| number:'1.0-2'}}
Min:
-
{{ getScaledValue(histogram.min)| number:'1.0-2')}}
+
{{ getScaledValue(histogram.min)| number:'1.0-2'}}
Max:
-
{{ getScaledValue(histogram.max)| number:'1.0-2')}}
+
{{ getScaledValue(histogram.max)| number:'1.0-2'}}
Confidence interval:
From a3eb2d961702ba59d9474432286593aed96841fd Mon Sep 17 00:00:00 2001 From: jenkins Date: Sat, 25 Nov 2023 14:55:18 +0000 Subject: [PATCH 5/5] [ci skip] Changed by Jenkins: 2391 --- package-lock.json | 6 +++--- package.json | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 241098e..71f9f8d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "farmmaps-lib-app", - "version": "4.0.0", + "version": "4.2.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "farmmaps-lib-app", - "version": "4.0.0", + "version": "4.2.0", "dependencies": { "@angular-eslint/eslint-plugin": "^15.2.1", "@angular/animations": "^14.1.3", @@ -86,7 +86,7 @@ }, "dist/common": { "name": "@farmmaps/common", - "version": "3.5.1-prerelease.2385", + "version": "2.0.0", "dependencies": { "tslib": "^2.3.0" }, diff --git a/package.json b/package.json index 3042e5d..4475899 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "farmmaps-lib-app", - "version": "4.0.2", + "version": "4.2.0", "scripts": { "ng": "ng", "start": "ng serve", @@ -86,4 +86,4 @@ "ts-node": "^8.8.1", "typescript": "~4.6.4" } -} +} \ No newline at end of file