improved alignment of legend. fixed rain in weatherservice.
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good

This commit is contained in:
Mark van der Wal 2020-07-25 09:57:24 +02:00
parent df04397b13
commit e6cda406c9
3 changed files with 23 additions and 8 deletions

View File

@ -28,13 +28,23 @@
</td>
</tr>
<tr *ngIf="showHistogram()">
<td colspan="4" class="pb-2 pt-2">
<div class="info pt-2" [ngbCollapse]="hideHistogramDetails">
<div><span i18n>Average: </span>{{layer.renderer.band.histogram.mean| number:'1.0-3'}}</div>
<div><span i18n>Standard deviation: </span>{{layer.renderer.band.histogram.stddev| number:'1.0-3'}}</div>
<div><span i18n>Min: </span>{{layer.renderer.band.histogram.min| number:'1.0-3'}}</div>
<div><span i18n>Max: </span>{{layer.renderer.band.histogram.max| number:'1.0-3'}}</div>
<div *ngIf="showConfidenceInterval()"><span i18n>Confidence interval:</span> {{layer.renderer.band.histogram.confidence * 100| number:'1.0-0'}}%</div>
<td colspan="4" class="pb-1 pt-1">
<div class="info" [ngbCollapse]="hideHistogramDetails">
<div class="row pl-3">
<div class="col-8 nopadding" i18n>Average<span>:</span></div>
<div class="col-4 pull-left nopadding">{{layer.renderer.band.histogram.mean| number:'1.0-2'}}</div>
<div class="col-8 nopadding" i18n>Standard deviation<span>:</span></div>
<div class="col-4 pull-left nopadding">{{layer.renderer.band.histogram.stddev| number:'1.0-2'}}</div>
<div class="col-8 nopadding" i18n>Min<span>:</span></div>
<div class="col-4 pull-left nopadding">{{layer.renderer.band.histogram.min| number:'1.0-2'}}</div>
<div class="col-8 nopadding" i18n>Max<span>:</span></div>
<div class="col-4 pull-left nopadding">{{layer.renderer.band.histogram.max| number:'1.0-2'}}</div>
<ng-container *ngIf="showConfidenceInterval()">
<div class="col-8 nopadding" i18n>Confidence interval<span>:</span></div>
<div class="col-4 pull-left nopadding">{{layer.renderer.band.histogram.confidence * 100| number:'1.0-0'}}%</div>
</ng-container>
</div>
</div>
</td>
</tr>

View File

@ -16,6 +16,11 @@
margin-bottom: 0;
}
.nopadding{
padding: 0 !important;
margin: 0 !important;
}
span.color {
display:inline-block;
width: 1.5em;

View File

@ -91,7 +91,7 @@ export class WeatherService {
minTemperature: Math.min(...wData.map(d => d.temperature)),
maxTemperature: Math.max(...wData.map(d => d.temperature)),
relHumidity: wData.reduce( (r, e) => r + e.relativeHumidity, 0) / wData.length,
precipitation: wData.reduce( (r, e) => r + e.rain, 0) * 10,
precipitation: wData.reduce( (r, e) => r + e.rain, 0),
wSpeed: wData.reduce( (r, e) => r + e.windSpeed, 0) / wData.length,
wDir: bestWindDirection,
wCardinal: bestCardinal