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 1635c6d..e30e66a 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 @@ -31,7 +31,7 @@
- + diff --git a/projects/common-map/src/fm-map/components/legend/statistics-details/statistics-details.component.html b/projects/common-map/src/fm-map/components/legend/statistics-details/statistics-details.component.html index c757b90..74009c5 100644 --- a/projects/common-map/src/fm-map/components/legend/statistics-details/statistics-details.component.html +++ b/projects/common-map/src/fm-map/components/legend/statistics-details/statistics-details.component.html @@ -2,23 +2,23 @@
Data points:
{{statistics.populationCount}}
Min:
-
{{statistics.min| number:'1.0-2'}}
+
{{getScaledValue(statistics.min)| number:'1.0-2'}}
Max:
-
{{statistics.max| number:'1.0-2'}}
+
{{getScaledValue(statistics.max)| number:'1.0-2'}}
Min+1:
-
{{statistics.minPlus| number:'1.0-2'}}
+
{{getScaledValue(statistics.minPlus)| number:'1.0-2'}}
Max-1:
-
{{statistics.maxMinus| number:'1.0-2'}}
+
{{getScaledValue(statistics.maxMinus)| number:'1.0-2'}}
Average:
-
{{statistics.mean| number:'1.0-2'}}
+
{{getScaledValue(statistics.mean)| number:'1.0-2'}}
Standard deviation:
-
{{statistics.stddev| number:'1.0-2'}}
+
{{getScaledValue(statistics.stddev)| number:'1.0-2'}}
Mode:
-
{{statistics.mode| number:'1.0-2'}}
+
{{getScaledValue(statistics.mode)| number:'1.0-2'}}
Median:
-
{{statistics.median| number:'1.0-2'}}
+
{{getScaledValue(statistics.median)| number:'1.0-2'}}
Kurtosis:
{{statistics.curtosis| number:'1.0-2'}}
@@ -26,11 +26,11 @@
{{statistics.skewness| number:'1.0-2'}}
Variance:
-
{{statistics.variance| number:'1.0-2'}}
+
{{getSquaredScaledValue(statistics.variance)| number:'1.0-2'}}
Coefficient of variation:
{{statistics.variationCoefficient | number:'1.0-2'}}
90% Confidence interval:
-
{{statistics.confidenceIntervalLow | number:'1.0-2'}} - {{statistics.confidenceIntervalHigh | number:'1.0-2'}}
+
{{getScaledValue(statistics.confidenceIntervalLow) | number:'1.0-2'}} - {{getScaledValue(statistics.confidenceIntervalHigh) | number:'1.0-2'}}
diff --git a/projects/common-map/src/fm-map/components/legend/statistics-details/statistics-details.component.ts b/projects/common-map/src/fm-map/components/legend/statistics-details/statistics-details.component.ts index cfb530f..9b845de 100644 --- a/projects/common-map/src/fm-map/components/legend/statistics-details/statistics-details.component.ts +++ b/projects/common-map/src/fm-map/components/legend/statistics-details/statistics-details.component.ts @@ -1,16 +1,35 @@ -import {Component, Input} from '@angular/core'; -import {IStatistics} from '../../../models/color.map'; +import { Component, Input } from '@angular/core'; +import { IStatistics } from '../../../models/color.map'; @Component({ selector: 'fm-map-statistics-details', templateUrl: './statistics-details.component.html', styles: ['.nopadding{\n' + - ' padding: 0 !important;\n' + - ' margin: 0 !important;\n' + - '}'] + ' padding: 0 !important;\n' + + ' margin: 0 !important;\n' + + '}'] }) export class StatisticsDetailsComponent { @Input() statistics: IStatistics; + @Input() + scale: number | null; + + public getScaledValue(value: number): number { + let v = value; + if (this.scale && this.scale != 0) { + v = this.scale * value; + } + return v; + } + + public getSquaredScaledValue(value: number): number { + let v = value; + if (this.scale && this.scale != 0) { + v = (this.scale * this.scale) * value; + } + return v; + } + }