overlap issue fixed
This commit is contained in:
parent
f3c26a303c
commit
9900a0eda5
@ -484,8 +484,14 @@ export class GraphListComponent implements OnInit {
|
|||||||
}];
|
}];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// res.response.Minrange, res.response.Maxrange
|
let range1 = [];
|
||||||
let range = [];
|
let range2 = [];
|
||||||
|
let range3 = []; // res.response.Minrange, res.response.Maxrange
|
||||||
|
if(DifficultychartDate.length == 1 && DifficultyCuckatoo[0] != 0 && DifficultyRandomx[0] != 0 && DifficultyProgpow[0] != 0){
|
||||||
|
range1 = [ (DifficultyCuckatoo[0] - (DifficultyCuckatoo[0] * 0.3)), (DifficultyCuckatoo[0] + (DifficultyCuckatoo[0] * 0.3)) ];
|
||||||
|
range2 = [ (DifficultyRandomx[0] - (DifficultyRandomx[0] * 0.3)), (DifficultyRandomx[0] + (DifficultyRandomx[0] * 0.3)) ];
|
||||||
|
range3 = [ (DifficultyProgpow[0] - (DifficultyProgpow[0] * 0.3)), (DifficultyProgpow[0] + (DifficultyProgpow[0] * 0.3)) ];
|
||||||
|
}
|
||||||
let tickformat = res.response.tickFormat;
|
let tickformat = res.response.tickFormat;
|
||||||
// this.lg_last =
|
// this.lg_last =
|
||||||
// TargetDifficulty[TargetDifficulty.length - 1];
|
// TargetDifficulty[TargetDifficulty.length - 1];
|
||||||
@ -496,7 +502,9 @@ export class GraphListComponent implements OnInit {
|
|||||||
DifficultychartDate,
|
DifficultychartDate,
|
||||||
data,
|
data,
|
||||||
this.Type,
|
this.Type,
|
||||||
range,
|
range1,
|
||||||
|
range2,
|
||||||
|
range3,
|
||||||
tickformat
|
tickformat
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
@ -505,7 +513,9 @@ export class GraphListComponent implements OnInit {
|
|||||||
DifficultychartDate,
|
DifficultychartDate,
|
||||||
data,
|
data,
|
||||||
this.Type,
|
this.Type,
|
||||||
range,
|
range1,
|
||||||
|
range2,
|
||||||
|
range3,
|
||||||
tickformat
|
tickformat
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
@ -591,7 +601,7 @@ export class GraphListComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
difficultyChartFunc(DifficultychartDate, data, Type, range, tickformat) {
|
difficultyChartFunc(DifficultychartDate, data, Type, range1, range2, range3, tickformat) {
|
||||||
// console.log('range rangerangerange',range);
|
// console.log('range rangerangerange',range);
|
||||||
this.linearGraphData = {
|
this.linearGraphData = {
|
||||||
data: data,
|
data: data,
|
||||||
@ -613,15 +623,15 @@ export class GraphListComponent implements OnInit {
|
|||||||
yaxis: {
|
yaxis: {
|
||||||
title: 'Cuckoo',
|
title: 'Cuckoo',
|
||||||
fixedrange: true,
|
fixedrange: true,
|
||||||
rangemode: 'nonnegative'
|
rangemode: 'nonnegative',
|
||||||
// showgrid: true,
|
// showgrid: true,
|
||||||
// range: range
|
range: range1
|
||||||
},
|
},
|
||||||
yaxis2: {
|
yaxis2: {
|
||||||
title: 'Progpow',
|
title: 'Progpow',
|
||||||
fixedrange: true,
|
fixedrange: true,
|
||||||
// showgrid: true,
|
// showgrid: true,
|
||||||
// range: range,
|
range: range3,
|
||||||
overlaying: 'y',
|
overlaying: 'y',
|
||||||
rangemode: 'nonnegative',
|
rangemode: 'nonnegative',
|
||||||
side: 'left',
|
side: 'left',
|
||||||
@ -631,7 +641,7 @@ export class GraphListComponent implements OnInit {
|
|||||||
title: 'RandomX',
|
title: 'RandomX',
|
||||||
fixedrange: true,
|
fixedrange: true,
|
||||||
// showgrid: true,
|
// showgrid: true,
|
||||||
// range: range,
|
range: range2,
|
||||||
anchor: 'x',
|
anchor: 'x',
|
||||||
overlaying: 'y',
|
overlaying: 'y',
|
||||||
rangemode: 'nonnegative',
|
rangemode: 'nonnegative',
|
||||||
@ -1270,7 +1280,7 @@ export class GraphListComponent implements OnInit {
|
|||||||
options: null,
|
options: null,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
totaldifficultyChartFunc(DifficultychartDate, data, type, range, tickformat) {
|
totaldifficultyChartFunc(DifficultychartDate, data, type, range1, range2, range3, tickformat) {
|
||||||
this.linearTotalGraphData = {
|
this.linearTotalGraphData = {
|
||||||
data: data,
|
data: data,
|
||||||
layout: {
|
layout: {
|
||||||
@ -1292,13 +1302,13 @@ export class GraphListComponent implements OnInit {
|
|||||||
fixedrange: true,
|
fixedrange: true,
|
||||||
rangemode: 'nonnegative',
|
rangemode: 'nonnegative',
|
||||||
// showgrid: true,
|
// showgrid: true,
|
||||||
// range: range
|
range: range1,
|
||||||
},
|
},
|
||||||
yaxis2: {
|
yaxis2: {
|
||||||
title: 'Progpow',
|
title: 'Progpow',
|
||||||
fixedrange: true,
|
fixedrange: true,
|
||||||
// showgrid: true,
|
// showgrid: true,
|
||||||
// range: range,
|
range: range3,
|
||||||
overlaying: 'y',
|
overlaying: 'y',
|
||||||
rangemode: 'nonnegative',
|
rangemode: 'nonnegative',
|
||||||
side: 'left',
|
side: 'left',
|
||||||
@ -1308,7 +1318,7 @@ export class GraphListComponent implements OnInit {
|
|||||||
title: 'RandomX',
|
title: 'RandomX',
|
||||||
fixedrange: true,
|
fixedrange: true,
|
||||||
// showgrid: true,
|
// showgrid: true,
|
||||||
// range: range,
|
range: range2,
|
||||||
rangemode: 'nonnegative',
|
rangemode: 'nonnegative',
|
||||||
anchor: 'x',
|
anchor: 'x',
|
||||||
overlaying: 'y',
|
overlaying: 'y',
|
||||||
|
Loading…
Reference in New Issue
Block a user