From 2495f4250fb42938559495c8916e14e981219f5e Mon Sep 17 00:00:00 2001 From: shunmugam Date: Tue, 7 Jan 2020 11:45:52 +0530 Subject: [PATCH] Commit for target and total difficulty load options --- .../view/home/graph-list/graph-list.component.html | 9 +++++++++ src/app/view/home/graph-list/graph-list.component.ts | 12 +++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/app/view/home/graph-list/graph-list.component.html b/src/app/view/home/graph-list/graph-list.component.html index fe951be..ce74b05 100644 --- a/src/app/view/home/graph-list/graph-list.component.html +++ b/src/app/view/home/graph-list/graph-list.component.html @@ -532,6 +532,15 @@ Difficultyreq('total', '', '', '3 months',''); selectedTarget = 5; TdifficultyRange = '3 months' " id="5" #itemtarget5 [ngClass]="{ active: selectedTarget == itemtarget5.id, day3m_txt: true }">3 {{'home.MONTHS' | translate}} + + + {{'home.All' | translate}} + + + +
diff --git a/src/app/view/home/graph-list/graph-list.component.ts b/src/app/view/home/graph-list/graph-list.component.ts index 29d855e..309f383 100644 --- a/src/app/view/home/graph-list/graph-list.component.ts +++ b/src/app/view/home/graph-list/graph-list.component.ts @@ -157,7 +157,7 @@ export class GraphListComponent implements OnInit { ) { return new Promise((resolve, reject) => { let params = new HttpParams(); - + if(interval == "all") { // this.Type="" fromDate = "2019-09-29 06:00:00" @@ -425,10 +425,16 @@ export class GraphListComponent implements OnInit { ) { this.Type = type != '' ? type : this.Type == '' ? 'all' : this.Type; + // loader enable while change tab + if(difftype == "total") + this.linearTotalGraphData = [] + else if(difftype == "target") + this.linearGraphData = [] + if(interval == "all") { // this.Type="" - fromDate = "2019-09-29 00:00:00" - ToDate = "2019-11-20 23:29:59" + fromDate = "2019-09-03 00:00:00" + ToDate = moment(new Date()).format("YYYY-MM-DD 23:29:59") } return new Promise((resolve, reject) => {