Fix widget mining graphs

This commit is contained in:
natsoni 2024-05-27 11:50:11 +02:00
parent e281684ca4
commit e9fc5c0433
No known key found for this signature in database
GPG Key ID: C65917583181743B
3 changed files with 10 additions and 6 deletions

View File

@ -54,8 +54,8 @@
</form> </form>
</div> </div>
<div [class]="!widget ? 'chart' : 'chart-widget'" *browserOnly [style]="{ height: widget ? ((height + 20) + 'px') : null}" echarts [initOpts]="chartInitOptions" [options]="chartOptions" <div [class]="!widget ? 'chart' : 'chart-widget'" *browserOnly [style]="{ height: widget ? ((height + 20) + 'px') : null, opacity: isLoading ? 0.5 : 1 }" echarts [initOpts]="chartInitOptions" [options]="chartOptions"
(chartInit)="onChartInit($event)" [style]="{opacity: isLoading ? 0.5 : 1}"> (chartInit)="onChartInit($event)">
</div> </div>
<div class="text-center loadingGraphs" *ngIf="!stateService.isBrowser || isLoading"> <div class="text-center loadingGraphs" *ngIf="!stateService.isBrowser || isLoading">
<div class="spinner-border text-light"></div> <div class="spinner-border text-light"></div>

View File

@ -349,7 +349,9 @@ export class HashrateChartComponent implements OnInit {
const selectedPowerOfTen: any = selectPowerOfTen(val); const selectedPowerOfTen: any = selectPowerOfTen(val);
const newVal = Math.round(val / selectedPowerOfTen.divider); const newVal = Math.round(val / selectedPowerOfTen.divider);
return `${newVal} ${selectedPowerOfTen.unit}H/s`; return `${newVal} ${selectedPowerOfTen.unit}H/s`;
} },
showMinLabel: false,
showMaxLabel: false,
}, },
splitLine: { splitLine: {
lineStyle: { lineStyle: {
@ -381,7 +383,9 @@ export class HashrateChartComponent implements OnInit {
const selectedPowerOfTen: any = selectPowerOfTen(val); const selectedPowerOfTen: any = selectPowerOfTen(val);
const newVal = Math.round(val / selectedPowerOfTen.divider); const newVal = Math.round(val / selectedPowerOfTen.divider);
return `${newVal} ${selectedPowerOfTen.unit}`; return `${newVal} ${selectedPowerOfTen.unit}`;
} },
showMinLabel: false,
showMaxLabel: false,
}, },
splitLine: { splitLine: {
show: false, show: false,

View File

@ -76,8 +76,8 @@
</div> </div>
<div [class]="!widget ? '' : 'pb-0'" class="container pb-lg-0"> <div [class]="!widget ? '' : 'pb-0'" class="container pb-lg-0">
<div [class]="widget ? 'chart-widget' : 'chart'" *browserOnly [style]="{ height: widget ? (height + 'px') : null}" echarts [initOpts]="chartInitOptions" [options]="chartOptions" <div [class]="widget ? 'chart-widget' : 'chart'" *browserOnly [style]="{ height: widget ? (height + 'px') : null, opacity: isLoading ? 0.5 : 1 }" echarts [initOpts]="chartInitOptions" [options]="chartOptions"
(chartInit)="onChartInit($event)" [style]="{opacity: isLoading ? 0.5 : 1}"> (chartInit)="onChartInit($event)">
</div> </div>
<div class="text-center loadingGraphs" *ngIf="!stateService.isBrowser || isLoading"> <div class="text-center loadingGraphs" *ngIf="!stateService.isBrowser || isLoading">