mirror of
https://github.com/simon987/task_tracker.git
synced 2025-04-10 05:56:42 +00:00
Sort workers by completed tasks in UI
This commit is contained in:
parent
fe7d684761
commit
a0650a89cc
@ -56,6 +56,8 @@ export class WorkerDashboardComponent implements OnInit {
|
||||
|
||||
private updateChart(data) {
|
||||
|
||||
data = data.sort((a, b) => b.closed_task_count - a.closed_task_count);
|
||||
|
||||
this.chart.data.labels = data.map(w => w.alias);
|
||||
this.chart.data.datasets = [{
|
||||
data: data.map(w => w.closed_task_count),
|
||||
|
Loading…
x
Reference in New Issue
Block a user