diff --git a/frontend/src/app/components/hashrate-chart/hashrate-chart.component.html b/frontend/src/app/components/hashrate-chart/hashrate-chart.component.html index cfcd15bfe..263df95b2 100644 --- a/frontend/src/app/components/hashrate-chart/hashrate-chart.component.html +++ b/frontend/src/app/components/hashrate-chart/hashrate-chart.component.html @@ -1,11 +1,6 @@ -
+
-
-
-
-
- -
+
+ +
+
+
+
+
diff --git a/frontend/src/app/components/hashrate-chart/hashrate-chart.component.scss b/frontend/src/app/components/hashrate-chart/hashrate-chart.component.scss index c3a63e9fa..30a810ca4 100644 --- a/frontend/src/app/components/hashrate-chart/hashrate-chart.component.scss +++ b/frontend/src/app/components/hashrate-chart/hashrate-chart.component.scss @@ -8,3 +8,37 @@ text-align: center; padding-bottom: 3px; } + +.full-container { + width: 100%; + height: calc(100% - 100px); + @media (max-width: 992px) { + height: calc(100% - 140px); + }; + @media (max-width: 576px) { + height: calc(100% - 180px); + }; +} + +.chart { + width: 100%; + height: 100%; + padding: 1.25rem; +} + +.formRadioGroup { + margin-top: 6px; + display: flex; + flex-direction: column; + @media (min-width: 830px) { + flex-direction: row; + float: right; + margin-top: 0px; + } + .btn-sm { + font-size: 9px; + @media (min-width: 830px) { + font-size: 14px; + } + } +} diff --git a/frontend/src/app/components/hashrate-chart/hashrate-chart.component.ts b/frontend/src/app/components/hashrate-chart/hashrate-chart.component.ts index 8a3413db5..24f0befd3 100644 --- a/frontend/src/app/components/hashrate-chart/hashrate-chart.component.ts +++ b/frontend/src/app/components/hashrate-chart/hashrate-chart.component.ts @@ -22,12 +22,16 @@ import { FormBuilder, FormGroup } from '@angular/forms'; }) export class HashrateChartComponent implements OnInit { @Input() widget: boolean = false; + @Input() right: number | string = 10; + @Input() left: number | string = 75; radioGroupForm: FormGroup; chartOptions: EChartsOption = {}; chartInitOptions = { - renderer: 'svg' + renderer: 'svg', + width: 'auto', + height: 'auto', }; hashrateObservable$: Observable; @@ -73,6 +77,10 @@ export class HashrateChartComponent implements OnInit { prepareChartOptions(data) { this.chartOptions = { + grid: { + right: this.right, + left: this.left, + }, title: { text: this.widget ? '' : $localize`:@@mining.hashrate:Hashrate`, left: 'center',