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

40 lines
1.2 KiB
HTML

<table class="container" *ngIf="layer">
<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"><div [style.background-color]="getHex(entry.color)"></div></td>
<td class="legend-items-text">{{entry.value | number:'1.0-2'}} {{legendunit}}</td>
<!--<td class="histogram-items-text"><span *ngIf="histogramenabled">{{entry.value}} {{histogramunit}}</span></td>
<td class="histogram-items">
<div *ngIf="histogramenabled" [style.background-color]="getHex(selectedColorMap.noValue)" [style.width]="getPart(selectedColorMap, entry)">
</div>
</td>-->
</tr>
<tr>
<td colspan="4"></td>
</tr>
<!--<tr>
<td>
<i class="fas fa-chart-bar" (click)="onClickHistoGram()"></i>
</td>
<td colspan="3"></td>
</tr>-->
</table>