From ee3d9bbc470353056d6bd02a1427af21e675b0c5 Mon Sep 17 00:00:00 2001 From: shunmugam Date: Fri, 13 Sep 2019 19:26:39 +0530 Subject: [PATCH] mobile layout fixes --- .../graph-view/graph-detail/graph-detail.component.ts | 6 +++--- src/app/view/home/graph-list/graph-list.component.ts | 10 ++++++++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/app/view/graph-view/graph-detail/graph-detail.component.ts b/src/app/view/graph-view/graph-detail/graph-detail.component.ts index d38fb18..fb198f2 100644 --- a/src/app/view/graph-view/graph-detail/graph-detail.component.ts +++ b/src/app/view/graph-view/graph-detail/graph-detail.component.ts @@ -241,9 +241,9 @@ export class GraphDetailComponent implements OnInit { case 'target-difficulty': this.comp.Difficultyreq('target',p1, p2, p3, p4).then(res => { this.hashdata = this.comp.linearGraphData; - this.hashdata.layout.height = 300; - this.hashdata.layout.xaxis.domain = [0.1,0.9]; - this.hashdata.layout.yaxis2.position = 2.25; + // this.hashdata.layout.height = 300; + // this.hashdata.layout.xaxis.domain = [0.1,0.9]; + // this.hashdata.layout.yaxis2.position = 2.25; this.title = 'Target Difficulty'; }); break; 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 c8cdcb0..b1abd66 100644 --- a/src/app/view/home/graph-list/graph-list.component.ts +++ b/src/app/view/home/graph-list/graph-list.component.ts @@ -612,15 +612,18 @@ export class GraphListComponent implements OnInit { let window_width = window.screen.width; let position = 0.00; let angle = 0; + let domain_start = 0; if(window_width > 700) { position = 0.10; angle = 0; + domain_start = 0.26; } else { position = 0.00; angle = -45; + domain_start = 0.34; } // console.log('range rangerangerange',range); @@ -638,7 +641,7 @@ export class GraphListComponent implements OnInit { tickformat: tickformat, fixedrange: true, rangemode: 'nonnegative', - domain: [0.26, 0.9], + domain: [domain_start, 0.9], // showgrid: true tickfont: { size: 12 @@ -1352,15 +1355,18 @@ export class GraphListComponent implements OnInit { let window_width = window.screen.width; let position = 0.00; let angle = 0; + let domain_start = 0; if(window_width > 700) { position = 0.10; angle = 0; + domain_start = 0.22; } else { position = 0.00; angle = -45; + domain_start = 0.3; } this.linearTotalGraphData = { data: data, @@ -1375,7 +1381,7 @@ export class GraphListComponent implements OnInit { tickangle: -40, tickformat: tickformat, fixedrange: true, - domain: [0.22, 0.9] + domain: [domain_start, 0.9] // showgrid: true }, yaxis: {