Skip to content

Commit

Permalink
update stats
Browse files Browse the repository at this point in the history
  • Loading branch information
maxulyanov committed Mar 27, 2017
1 parent d413c1b commit 0db5e6e
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
2 changes: 2 additions & 0 deletions src/pages/stats/stats.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@

<chart [options]="optionsChart"></chart>

<div class="total-sum">Всего: <span class="total-sum-s">{{ totalSumFormatted }} &#8381;</span></div>

<div class="container-list-stats">
<div class="grid-row">
<div class="grid-column-12 grid-padding grid-left" *ngFor="let category of categories">
Expand Down
20 changes: 15 additions & 5 deletions src/pages/stats/stats.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,26 @@ page-stats {
.highcharts-container {
margin: -10px auto 0;
}
.total-sum {
display: flex;
width: 100%;
margin: -15px 0 25px 0;
align-items: center;
justify-content: center;
color: #FFF;
font-size: 1.3rem;
text-transform: uppercase;
.total-sum-s {
margin-left: 5px;
font-size: 1.7rem;
}
}
}

.container-chart {
margin-top: -25px;
}

.container-list-stats {
margin-top: -10px;
}

.container-controls-change-month {
width: 100%;
position: absolute;
Expand All @@ -40,7 +50,7 @@ page-stats {
}

.b-current-date {
margin: 28px 0 20px 0;
margin: 28px 0 15px 0;
text-align: center;
text-transform: uppercase;
}
3 changes: 3 additions & 0 deletions src/pages/stats/stats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export class StatsPage {
public isReadyChart: boolean;
public totalCount: number;
public totalSum: number;
public totalSumFormatted: string;
public month: string;
public year: number;
public isCurrentMonth: boolean;
Expand Down Expand Up @@ -169,6 +170,8 @@ export class StatsPage {
}
}

this.totalSumFormatted = Utils.separatedBySpaceNumber(this.totalSum);

arrayCategories.sort(Utils.sortBy({
name: 'sum',
reverse: true
Expand Down

0 comments on commit 0db5e6e

Please sign in to comment.