mirror of
https://github.com/benjamin-wilson/public-pool-ui.git
synced 2025-03-27 02:01:42 +01:00
fixed chart sizing
This commit is contained in:
parent
09ba050849
commit
1516f90712
@ -51,16 +51,20 @@
|
||||
[routerLink]="['app',address.value]"></button>
|
||||
</div>
|
||||
|
||||
<div class="text-right">Uptime: {{uptime$ | async | dateAgo}}</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
|
||||
<div *ngIf="chartData$ | async as chartData">
|
||||
<div class="card">
|
||||
|
||||
<p-chart type="line" [data]="chartData" [options]="chartOptions"></p-chart>
|
||||
<div *ngIf="chartData$ | async as chartData">
|
||||
<div class="card chart">
|
||||
|
||||
<div class="text-center mb-2">Uptime: {{uptime$ | async | dateAgo}}</div>
|
||||
|
||||
|
||||
<p-chart [responsive]="true" type="line" [data]="chartData" [options]="chartOptions"></p-chart>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -38,6 +38,7 @@ export class SplashComponent {
|
||||
this.chartData$ = this.appService.getInfoChart().pipe(
|
||||
map((chartData: any) => {
|
||||
return {
|
||||
|
||||
labels: chartData.map((d: any) => d.label),
|
||||
datasets: [
|
||||
{
|
||||
@ -66,6 +67,7 @@ export class SplashComponent {
|
||||
|
||||
|
||||
this.chartOptions = {
|
||||
maintainAspectRatio: false,
|
||||
plugins: {
|
||||
legend: {
|
||||
labels: {
|
||||
|
@ -9,4 +9,10 @@
|
||||
|
||||
.p-datatable.p-datatable-hoverable-rows .p-datatable-tbody>tr:not(.p-highlight) {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
||||
p-chart>div {
|
||||
position: relative;
|
||||
min-height: 40vh;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user