Make histogram info block collapsable
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good

This commit is contained in:
Willem Dantuma 2020-05-27 10:57:25 +02:00
parent ca776b0cb5
commit cc6229002c
3 changed files with 16 additions and 7 deletions

View File

@ -24,13 +24,18 @@
</div>
</td>
</tr>
<tr>
<td colspan="4" *ngIf="showConfidenceInterval()"> </td>
<tr *ngIf="showHistogram()">
<td colspan="4" class="pb-2 pt-2">
<a i18n-title title="more info"><i class="fa fa-info-circle text-primary" (click)="hideHistogramDetails = !hideHistogramDetails"></i></a>
<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>
</div>
</td>
</tr>
<tr *ngIf="showConfidenceInterval()">
<td colspan="4" class="pb-2 pt-2"><span i18n>Confidence interval:</span> {{layer.renderer.band.histogram.confidence * 100| number:'1.0-0'}}% </td>
</tr>
</table>

View File

@ -63,5 +63,8 @@ span.color {
font-size:0.7em;
}
.info {
line-height: 1.3em;
}

View File

@ -40,6 +40,7 @@ export class LegendComponent implements OnInit,AfterViewInit {
@Input()
histogramunit: string;
public hideHistogramDetails:boolean = true;
onClickHistoGram(): void {
this.histogramenabled = !this.histogramenabled;