Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

Commit

Permalink
fix: fix dashboard category analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
forecho committed Sep 5, 2020
1 parent 9fee6dd commit 0e38a7e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/routes/dashboard/dashboard.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export class DashboardComponent implements OnInit {

getCategoryiesData() {
this.http.get('/api/categories/analysis').subscribe((res) => {
this.categoriesData = res.data;
this.categoriesData = res.data.filter((i: any) => i.y > 0);
if (this.categoriesData) {
this.categoriesTotal = this.categoriesData.reduce((pre, now) => now.y + pre, 0);
}
Expand Down

0 comments on commit 0e38a7e

Please sign in to comment.