This commit is contained in:
Willem Dantuma 2021-08-18 14:34:45 +02:00
parent 52a72b042c
commit 54b8a3bf24
2 changed files with 2 additions and 2 deletions

View File

@ -17,7 +17,7 @@
</div>
<div *ngIf="itemLayer.legendVisible">
<div class="card legend">
<fm-map-layer-legend [layer]="firstLayer(itemLayer)" (click)="handleLegendClick($event,itemLayer);"></fm-map-layer-legend>
<fm-map-layer-legend [layer]="firstLayer(itemLayer)" (click)="handleLegendClick($event,itemLayer);" [histogramenabled]="true"></fm-map-layer-legend>
</div>
</div>
</div>

View File

@ -89,7 +89,7 @@ export class LegendComponent implements OnInit,AfterViewInit {
}
showHistogram(): boolean {
return this.histogramenabled && this.layer.renderer.band.histogram.entries && this.layer.renderer.band.histogram.entries.length > 0 && this.layer.renderer.colorMap.colormapType == "minmax";
return this.histogramenabled && this.layer.renderer.band.histogram.entries && this.layer.renderer.band.histogram.entries.length > 0 && this.layer.renderer.band.histogram.entries.length == this.layer.renderer.colorMap.entries.length;
}
bandContainsStatistics(): boolean {