desktop/src/app/components/pool/graphs/heatmap/legend/nodes-heatmap-legend.html (25 lines of code) (raw):

<div *ngFor="let item of stateTree;trackBy: trackState"> <bl-clickable *ngIf="item.state" class="legend-item state" (do)="selectState(item.state)" [attr.aria-selected]="item.state === highlightedState" [class.highlighted]="item.state === highlightedState" (contextmenu)="openContextMenu(item)"> <div [style.backgroundColor]="colors.get(item.state)" class="color"></div> <div class="label">{{item.state}} ({{stateCounter.get(item.state) | async}})</div> </bl-clickable> <div *ngIf="item.category"> <bl-clickable class="legend-item category" (do)="selectState(item.category, item.category)" [attr.aria-selected]="item.category === highlightedState" [class.highlighted]="item.category === highlightedState" (contextmenu)="openContextMenu(item)" [attr.aria-expanded]="item.category === expandedCategory"> <div [style.backgroundColor]="item.color" class="color"></div> <div class="label">{{item.label}} ({{stateCounter.getCountforCategory(item.category)}})</div> <div class="category-expansion"> <i class="fa" [class.fa-caret-down]="item.category === expandedCategory" [class.fa-caret-left]="item.category !== expandedCategory" aria-hidden="true"></i> </div> </bl-clickable> <div *ngIf="item.category === expandedCategory"> <div *ngIf="item.subtitle" class="subtitle">{{item.subtitle}}</div> <bl-clickable *ngFor="let subitem of item.states;trackBy: trackState" class="legend-subitem state" (do)="selectState(subitem.state, item.category)" [attr.aria-selected]="subitem.state === highlightedState" [class.highlighted]="subitem.state === highlightedState" (contextmenu)="openContextMenu(item)"> <div [style.backgroundColor]="colors.get(subitem.state)" class="color"></div> <div class="label">{{subitem.state}} ({{stateCounter.get(subitem.state) | async}})</div> </bl-clickable> </div> </div> </div>