Merge branch 'master' into feature/update-hashrate-widget

This commit is contained in:
wiz
2022-03-14 19:12:31 +00:00
committed by GitHub
21 changed files with 957 additions and 113 deletions

View File

@@ -61,6 +61,7 @@ export class HashrateChartComponent implements OnInit {
.pipe(
startWith('1y'),
switchMap((timespan) => {
this.isLoading = true;
return this.apiService.getHistoricalHashrate$(timespan)
.pipe(
tap((data: any) => {
@@ -144,6 +145,7 @@ export class HashrateChartComponent implements OnInit {
this.chartOptions = {
title: title,
animation: false,
color: [
new graphic.LinearGradient(0, 0, 0, 0.65, [
{ offset: 0, color: '#F4511E' },
@@ -158,7 +160,7 @@ export class HashrateChartComponent implements OnInit {
top: 30,
right: this.right,
left: this.left,
bottom: this.widget ? 30 : 60,
bottom: this.widget ? 30 : this.isMobile() ? 90 : 60,
},
tooltip: {
show: !this.isMobile() || !this.widget,
@@ -289,17 +291,18 @@ export class HashrateChartComponent implements OnInit {
type: 'inside',
realtime: true,
zoomLock: true,
zoomOnMouseWheel: true,
moveOnMouseMove: true,
maxSpan: 100,
minSpan: 10,
moveOnMouseMove: false,
}, {
showDetail: false,
show: true,
type: 'slider',
brushSelect: false,
realtime: true,
bottom: 0,
bottom: this.isMobile() ? 30 : 0,
left: 20,
right: 15,
selectedDataBackground: {
lineStyle: {
color: '#fff',