Changes fixeed
This commit is contained in:
parent
841567568b
commit
7ff9209919
@ -25,24 +25,36 @@
|
||||
</div>
|
||||
<div class="day_filter">
|
||||
<a href="JavaScript:void(0);" (click)="
|
||||
Difficultyreq('', '', '1 day'); selectedItem = 6
|
||||
Difficultyreq('', '', '1 day',''); selectedItem = 6
|
||||
" id="6" #item6 [ngClass]="{ active: selectedItem == item6.id, txt_primay: true }">1 Day</a>
|
||||
<a href="JavaScript:void(0);" (click)="
|
||||
Difficultyreq('', '', '1 week'); selectedItem = 1
|
||||
Difficultyreq('', '', '1 week',''); selectedItem = 1
|
||||
" id="1" #item1 [ngClass]="{ active: selectedItem == item1.id, txt_primay: true }">1 {{'home.WEEK' | translate}}</a>
|
||||
<a href="JavaScript:void(0);" (click)="
|
||||
Difficultyreq('', '', '15 days'); selectedItem = 2
|
||||
Difficultyreq('', '', '15 days',''); selectedItem = 2
|
||||
" id="2" #item2 [ngClass]="{ active: selectedItem == item2.id, day15_txt: true }">15 {{'home.DAYS' | translate}}</a>
|
||||
<a href="JavaScript:void(0);" (click)="
|
||||
Difficultyreq('', '', '30 days'); selectedItem = 3
|
||||
Difficultyreq('', '', '30 days',''); selectedItem = 3
|
||||
" id="3" #item3 [ngClass]="{ active: selectedItem == item3.id, day30_txt: true }">30 {{'home.DAYS' | translate}}</a>
|
||||
<a href="JavaScript:void(0);" (click)="
|
||||
Difficultyreq('', '', '60 days'); selectedItem = 4
|
||||
Difficultyreq('', '', '60 days',''); selectedItem = 4
|
||||
" id="4" #item4 [ngClass]="{ active: selectedItem == item4.id, day60_txt: true }">60 {{'home.DAYS' | translate}}</a>
|
||||
<a href="JavaScript:void(0);" (click)="
|
||||
Difficultyreq('', '', '3 months'); selectedItem = 5
|
||||
Difficultyreq('', '', '3 months',''); selectedItem = 5
|
||||
" id="5" #item5 [ngClass]="{ active: selectedItem == item5.id, day3m_txt: true }">3 {{'home.MONTHS' | translate}}</a>
|
||||
</div>
|
||||
|
||||
<div class="day_filter">
|
||||
<a href="JavaScript:void(0);" (click)="
|
||||
Difficultyreq('', '', '1 day','cuckatoo'); selectedItem12 = 1
|
||||
" id="1" #item12 [ngClass]="{ active: selectedItem12 == item12.id, txt_primay: true }">Cuckoo</a>
|
||||
<a href="JavaScript:void(0);" (click)="
|
||||
Difficultyreq('', '', '1 day','progpow'); selectedItem12 = 2
|
||||
" id="2" #item12 [ngClass]="{ active: selectedItem12 == item12.id, txt_primay: true }">ProgPow</a>
|
||||
<a href="JavaScript:void(0);" (click)="
|
||||
Difficultyreq('', '', '1 day','randomx'); selectedItem12 = 3
|
||||
" id="3" #item12 [ngClass]="{ active: selectedItem12 == item12.id, txt_primay: true }">RandomX</a>
|
||||
</div>
|
||||
<div class="explore_all text-right">
|
||||
<a routerLink="/chart/total-difficulty"><span class="text-uppercase d-block">{{'home.EXPLORE_IT' | translate}} <i
|
||||
class="fa fa-long-arrow-right"></i></span></a>
|
||||
|
@ -48,12 +48,14 @@ export class GraphListComponent implements OnInit {
|
||||
public selectedItem9: Number = 3;
|
||||
public selectedItem10: Number = 3;
|
||||
public selectedItem11: Number = 3;
|
||||
public selectedItem12: Number = 1;
|
||||
|
||||
public tInput: any;
|
||||
public tOutput: any;
|
||||
public tKernal: any;
|
||||
public tDate: any;
|
||||
public tHour: any;
|
||||
public Type: any = '';
|
||||
|
||||
viewchartvar: boolean;
|
||||
|
||||
@ -376,12 +378,15 @@ export class GraphListComponent implements OnInit {
|
||||
fromDate = '',
|
||||
ToDate = '',
|
||||
interval = '',
|
||||
type = ''
|
||||
) {
|
||||
this.Type = this.Type == '' ? type != '' ? type : 'cuckatoo' : this.Type;
|
||||
return new Promise((resolve, reject) => {
|
||||
let params = new HttpParams();
|
||||
params = params.append('FromDate', fromDate);
|
||||
params = params.append('ToDate', ToDate);
|
||||
params = params.append('Interval', interval);
|
||||
params = params.append('Type', this.Type);
|
||||
this.chartService
|
||||
.apiGetRequest(params, '/blockchain_block/totaldiff')
|
||||
.subscribe(
|
||||
@ -389,18 +394,13 @@ export class GraphListComponent implements OnInit {
|
||||
if (res['status'] == 200) {
|
||||
let DifficultychartDate = res.response.Date;
|
||||
let BlocksChartDate = res.response.blockDate;
|
||||
let DifficultyCuckaroo = res.response.DifficultyCuckaroo;
|
||||
let DifficultyCuckatoo = res.response.DifficultyCuckatoo;
|
||||
let DifficultyProgpow = res.response.DifficultyProgpow;
|
||||
let DifficultyRandomx = res.response.DifficultyRandomx;
|
||||
let TargetDifficulty = res.response.TargetDifficulty;
|
||||
this.lg_last =
|
||||
[DifficultyCuckaroo[DifficultyCuckaroo.length - 1],DifficultyCuckatoo[DifficultyCuckatoo.length - 1],DifficultyProgpow[DifficultyProgpow.length - 1],DifficultyRandomx[DifficultyRandomx.length - 1]];
|
||||
TargetDifficulty[TargetDifficulty.length - 1];
|
||||
this.difficultyChartFunc(
|
||||
DifficultychartDate,
|
||||
DifficultyCuckaroo,
|
||||
DifficultyCuckatoo,
|
||||
DifficultyProgpow,
|
||||
DifficultyRandomx
|
||||
TargetDifficulty,
|
||||
this.Type
|
||||
);
|
||||
resolve();
|
||||
}
|
||||
@ -438,49 +438,49 @@ export class GraphListComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
difficultyChartFunc(DifficultychartDate, DifficultyCuckaroo, DifficultyCuckatoo, DifficultyProgpow, DifficultyRandomx) {
|
||||
difficultyChartFunc(DifficultychartDate, TargetDifficulty, Type) {
|
||||
this.linearGraphData = {
|
||||
data: [
|
||||
{
|
||||
x: DifficultychartDate,
|
||||
y: DifficultyCuckaroo,
|
||||
text: DifficultyCuckaroo,
|
||||
y: TargetDifficulty,
|
||||
text: TargetDifficulty,
|
||||
mode: 'lines+markers',
|
||||
type: 'scatter',
|
||||
name: '',
|
||||
line: { color: '#ac3333' },
|
||||
hovertemplate: '%{x}<br> Cuckaroo : %{text:,}',
|
||||
},
|
||||
{
|
||||
x: DifficultychartDate,
|
||||
y: DifficultyCuckatoo,
|
||||
text: DifficultyCuckatoo,
|
||||
mode: 'lines+markers',
|
||||
type: 'scatter',
|
||||
name: '',
|
||||
line: { color: '#A876C6' },
|
||||
hovertemplate: '%{x}<br> Cuckatoo : %{text:,}',
|
||||
},
|
||||
{
|
||||
x: DifficultychartDate,
|
||||
y: DifficultyProgpow,
|
||||
text: DifficultyProgpow,
|
||||
mode: 'lines+markers',
|
||||
type: 'scatter',
|
||||
name: '',
|
||||
line: { color: '#54CFDC' },
|
||||
hovertemplate: '%{x}<br> Progpow : %{text:,}',
|
||||
},
|
||||
{
|
||||
x: DifficultychartDate,
|
||||
y: DifficultyRandomx,
|
||||
text: DifficultyRandomx,
|
||||
mode: 'lines+markers',
|
||||
type: 'scatter',
|
||||
name: '',
|
||||
line: { color: '#77817C' },
|
||||
hovertemplate: '%{x}<br> Randomx : %{text:,}',
|
||||
hovertemplate: '%{x}<br> Difficulty : %{text:,}',
|
||||
},
|
||||
// {
|
||||
// x: DifficultychartDate,
|
||||
// y: DifficultyCuckatoo,
|
||||
// text: DifficultyCuckatoo,
|
||||
// mode: 'lines+markers',
|
||||
// type: 'scatter',
|
||||
// name: '',
|
||||
// line: { color: '#A876C6' },
|
||||
// hovertemplate: '%{x}<br> Cuckatoo : %{text:,}',
|
||||
// },
|
||||
// {
|
||||
// x: DifficultychartDate,
|
||||
// y: DifficultyProgpow,
|
||||
// text: DifficultyProgpow,
|
||||
// mode: 'lines+markers',
|
||||
// type: 'scatter',
|
||||
// name: '',
|
||||
// line: { color: '#54CFDC' },
|
||||
// hovertemplate: '%{x}<br> Progpow : %{text:,}',
|
||||
// },
|
||||
// {
|
||||
// x: DifficultychartDate,
|
||||
// y: DifficultyRandomx,
|
||||
// text: DifficultyRandomx,
|
||||
// mode: 'lines+markers',
|
||||
// type: 'scatter',
|
||||
// name: '',
|
||||
// line: { color: '#77817C' },
|
||||
// hovertemplate: '%{x}<br> Randomx : %{text:,}',
|
||||
// },
|
||||
],
|
||||
layout: {
|
||||
hovermode: 'closest',
|
||||
|
Loading…
Reference in New Issue
Block a user