refactor to use array of objects to map state data to chart update

This commit is contained in:
Jesse Lucas
2020-03-29 16:51:12 -04:00
parent 598dc991e8
commit f342a2a54b
2 changed files with 21 additions and 12 deletions
@@ -4,7 +4,7 @@
<div fxLayout="row" fxLayoutAlign="space-between start">
<app-donut-chart [elementID]="chartID"></app-donut-chart>
<div class="items" fxLayout="column" fxLayoutAlign="space-evenly end">
<app-chart-item *ngFor="let state of states | keyvalue" [state]="state.key" [count]="state.value">
<app-chart-item *ngFor="let state of states" [state]="state.label" [count]="state.count">
</app-chart-item>
</div>
</div>