FarmMapsLib/projects/common-map/src/fm-map/components/legend/histogram-details/histogram-details.component.ts

32 lines
721 B
TypeScript

import { Component, Input } from '@angular/core';
import { IHistogram } from '../../../models/color.map';
@Component({
selector: 'fm-map-histogram-details',
templateUrl: './histogram-details.component.html',
styles: ['.nopadding{\n' +
' padding: 0 !important;\n' +
' margin: 0 !important;\n' +
'}']
})
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;
}
}