total difficulty graph overlap and fee graph fixes

This commit is contained in:
shunmugam 2019-09-13 16:09:31 +05:30
parent a79d1b71aa
commit 9c49f4db4b
2 changed files with 26 additions and 11 deletions

View File

@ -215,7 +215,7 @@
<div class="box_shadow"> <div class="box_shadow">
<div class="blocks"> <div class="blocks">
<h2 class="chart_heading d-inline-block">{{'home.TRANSACTION_FEES' | translate}}</h2> <h2 class="chart_heading d-inline-block">{{'home.TRANSACTION_FEES' | translate}}</h2>
<span class="txn_count" title="{{'home.TRANSACTION_FEE_HOVER' | translate}}" *ngIf="this.fg_last">{{this.fg_last |number}}</span> <span style="display:none;" class="txn_count" title="{{'home.TRANSACTION_FEE_HOVER' | translate}}" *ngIf="this.fg_last">{{this.fg_last |number}}</span>
<div class="chart_show"> <div class="chart_show">
<epic-explorer-plotly *ngIf="transcationGraphData.data" [data]="transcationGraphData.data" <epic-explorer-plotly *ngIf="transcationGraphData.data" [data]="transcationGraphData.data"

View File

@ -1318,6 +1318,19 @@ export class GraphListComponent implements OnInit {
}; };
} }
totaldifficultyChartFunc(DifficultychartDate, data, type, range1, range2, range3, tickformat) { totaldifficultyChartFunc(DifficultychartDate, data, type, range1, range2, range3, tickformat) {
let window_width = window.screen.width;
let position;
let angle;
if(window_width > 700)
{
position = 0.10;
angle = 0;
}
else
{
position = 0.00;
angle = -45;
}
this.linearTotalGraphData = { this.linearTotalGraphData = {
data: data, data: data,
layout: { layout: {
@ -1328,10 +1341,10 @@ export class GraphListComponent implements OnInit {
legend: {"orientation": "h", legend: {"orientation": "h",
x: 0.1, y: -0.5,font :{ 'size': 10}}, x: 0.1, y: -0.5,font :{ 'size': 10}},
xaxis: { xaxis: {
tickangle: -45, tickangle: -40,
tickformat: tickformat, tickformat: tickformat,
fixedrange: true, fixedrange: true,
domain: [0.2, 0.8] domain: [0.22, 0.9]
// showgrid: true // showgrid: true
}, },
yaxis: { yaxis: {
@ -1340,9 +1353,9 @@ export class GraphListComponent implements OnInit {
rangemode: 'nonnegative', rangemode: 'nonnegative',
// showgrid: true, // showgrid: true,
range: range1, range: range1,
tickangle: 'auto', tickangle: angle,
tickfont: { tickfont: {
size: 14 size: 12
} }
}, },
yaxis2: { yaxis2: {
@ -1351,12 +1364,13 @@ export class GraphListComponent implements OnInit {
// showgrid: true, // showgrid: true,
range: range3, range: range3,
// overlaying: 'y', // overlaying: 'y',
overlaying: 'y',
rangemode: 'nonnegative', rangemode: 'nonnegative',
side: 'right', // side: 'right',
position: 1.25, position: position ,
tickangle: 'auto', tickangle: angle,
tickfont: { tickfont: {
size: 14 size: 12
} }
}, },
yaxis3: { yaxis3: {
@ -1368,9 +1382,10 @@ export class GraphListComponent implements OnInit {
anchor: 'x', anchor: 'x',
overlaying: 'y', overlaying: 'y',
side: 'right', side: 'right',
tickangle: 'auto', position: 0.00 ,
tickangle: angle,
tickfont: { tickfont: {
size: 14 size: 12
} }
}, },