FarmMapsLib/projects/common-map/src/lib/components/item-list-item-temporal/item-list-item-temporal.com...

23 lines
1.2 KiB
HTML

<div *ngIf="(lastTemporalItem$|async) as lastChildItem">
<div *ngIf="lastChildItem.data.layers[0].renderer.band.histogram;let histogram">
<div class="widget" (click)="onWidgetClicked()">
<div class="d-flex flex-column justify-content-center w-100 h-100">
<div class="head h-20 p-1">Soil moisture (<span class="unit">&#37;</span>)</div>
<div class="dateformat p-1">{{lastChildItem.dataDate | date : 'shortDate'}}</div>
<div class="body d-flex flex-row h-100 w-100">
<div *ngIf="histogram.mean; else noMeanPresent">
<div class="mean flex-grow-1 pr-2 pl-2">{{histogram.mean/10 | number:'0.1-2'}}</div>
</div>
<ng-template #noMeanPresent>
<div class="mean flex-grow-1 pr-2 pl-2">{{(histogram.max+histogram.min)/2 | number:'0.1-2'}}</div>
</ng-template>
<div class="d-flex flex-column w-20">
<div class="justify-content-center pr-2 pl-2 min">{{histogram.min/10 | number:'0.1-2'}}</div>
<div class="justify-content-center pr-2 pl-2 max">{{histogram.max/10 | number:'0.1-2'}}</div>
</div>
</div>
</div>
</div>
</div>
</div>