[accelerator] fix accel bid boost chart height

This commit is contained in:
nymkappa 2024-03-01 11:04:40 +01:00
parent af6af2748c
commit cda5448f13
No known key found for this signature in database
GPG key ID: 92358FC85D9645DE
3 changed files with 10 additions and 8 deletions

View file

@ -25,7 +25,8 @@
flex-direction: column;
padding: 0px 15px;
width: 100%;
height: calc(100vh - 250px);
height: calc(100vh - 225px);
min-height: 400px;
@media (min-width: 992px) {
height: calc(100vh - 150px);
}
@ -35,6 +36,7 @@
display: flex;
flex: 1;
width: 100%;
height: 100%;
padding-bottom: 20px;
padding-right: 10px;
@media (max-width: 992px) {

View file

@ -29,7 +29,7 @@ import { ApiService } from '../../../services/api.service';
})
export class AccelerationFeesGraphComponent implements OnInit, OnDestroy {
@Input() widget: boolean = false;
@Input() height: number | string = '200';
@Input() height: number = 300;
@Input() right: number | string = 45;
@Input() left: number | string = 75;
@Input() accelerations$: Observable<Acceleration[]>;
@ -177,11 +177,11 @@ export class AccelerationFeesGraphComponent implements OnInit, OnDestroy {
],
animation: false,
grid: {
height: this.height,
height: (this.widget && this.height) ? this.height - 30 : undefined,
top: this.widget ? 20 : 40,
bottom: this.widget ? 30 : 80,
right: this.right,
left: this.left,
bottom: this.widget ? 30 : 80,
top: this.widget ? 20 : (this.isMobile() ? 10 : 50),
},
tooltip: {
show: !this.isMobile(),

View file

@ -128,11 +128,11 @@ export class AcceleratorDashboardComponent implements OnInit {
@HostListener('window:resize', ['$event'])
onResize(): void {
if (window.innerWidth >= 992) {
this.graphHeight = 330;
this.graphHeight = 380;
} else if (window.innerWidth >= 768) {
this.graphHeight = 245;
this.graphHeight = 300;
} else {
this.graphHeight = 210;
this.graphHeight = 270;
}
}
}