getPercentage
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
This commit is contained in:
parent
bcfa13de60
commit
880eb26a99
@ -78,7 +78,7 @@ export class LegendComponent implements OnInit,AfterViewInit {
|
|||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
public getLabel(renderer: IRenderer, index: number): number {
|
public getPercentage(renderer: IRenderer, index: number): number {
|
||||||
let scale = 100 / renderer.band.histogram.entries.reduce((sum, entry) => sum + entry.freqency, 0);
|
let scale = 100 / renderer.band.histogram.entries.reduce((sum, entry) => sum + entry.freqency, 0);
|
||||||
let percent = renderer.band.histogram.entries[index].freqency * scale;
|
let percent = renderer.band.histogram.entries[index].freqency * scale;
|
||||||
return percent < 0.1 ? null : percent;
|
return percent < 0.1 ? null : percent;
|
||||||
|
Loading…
Reference in New Issue
Block a user