Browse Source

fix stats

master
drfelfel 1 year ago
parent
commit
72d7d265f8
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      src/routes/panel/dashboard/app/app.component.ts

+ 4
- 3
src/routes/panel/dashboard/app/app.component.ts View File

@ -70,11 +70,12 @@ export class AppComponent implements OnInit {
}, (res => {
if (!cachedColor) cachedColor = this.RandomColor(res['data']['counts'].length)
if (!cachedLabel) cachedLabel = res['data']['counts'].map((major) => {
console.log(res['data'])
if (!cachedColor) cachedColor = this.RandomColor(res['data']['majors'].length)
if (!cachedLabel) cachedLabel = res['data']['majors'].map((major) => {
return major._id
}),
this.buildMajorsStats(res['data']['counts'], cachedColor, cachedLabel)
this.buildMajorsStats(res['data']['majors'], cachedColor, cachedLabel)

Loading…
Cancel
Save