FarmMapsLib/projects/common-map/src/fm-map/components/legend/legend.component.html

40 lines
1.4 KiB
HTML
Raw Normal View History

2019-12-18 09:21:25 +00:00
<table class="container" *ngIf="showLegend()">
2019-11-29 11:24:34 +00:00
<tr>
<td colspan="2">
<div class="title">
<h4 *ngIf="showTitle">{{layer.name}}</h4>
<b *ngIf="layer.unit">({{layer.unit}})</b>
</div>
</td>
<td colspan="2">
<div class="title" *ngIf="histogramenabled">
<h4>{{histogram}}</h4>
<b *ngIf="histogramunit">({{histogramunit}})</b>
</div>
</td>
</tr>
<tr *ngFor="let entry of layer.renderer.colorMap.entries; let i = index ">
<td class="legend-items"><span [style.background-color]="getHex(entry.color)" class="color"></span></td>
2020-04-07 07:43:54 +00:00
<td class="legend-items-text"><span *ngIf="!entry.label">{{getScaledValue(entry.value,layer.scale) | number:'1.0-2'}} {{legendunit}}</span><span *ngIf="entry.label">{{entry.label}}</span></td>
2019-11-29 11:24:34 +00:00
<td class="histogram-items">
<div *ngIf="showHistogram()">
<span class="bar" [style.background-color]="getHex(entry.color)" [style.width]="getPart(layer.renderer, i)">
</span>
<span class="bar-label">{{getLabel(layer.renderer,i)}}</span>
</div>
</td>
</tr>
<tr>
2020-05-26 15:19:07 +00:00
<td colspan="4" *ngIf="showConfidenceInterval()"> </td>
</tr>
<tr *ngIf="showConfidenceInterval()">
2020-05-26 16:19:46 +00:00
<td colspan="4" class="pb-2 pt-2"><span i18n>Confidence interval:</span> {{layer.renderer.band.histogram.confidence * 100| number:'1.0-0'}}% </td>
2020-05-26 15:19:07 +00:00
</tr>
2019-11-29 11:24:34 +00:00
</table>