diff --git a/src/main/angular/src/app/location/energy/charts/energy-charts.ts b/src/main/angular/src/app/location/energy/charts/energy-charts.ts
index 65ec6e0..eef2963 100644
--- a/src/main/angular/src/app/location/energy/charts/energy-charts.ts
+++ b/src/main/angular/src/app/location/energy/charts/energy-charts.ts
@@ -25,6 +25,12 @@ const COLOR_BACK_CONSUME = "#ffc07a";
})
class EnergyCharts {
+ @Input()
+ maxY: number | undefined = undefined;
+
+ @Input()
+ minY: number | undefined = undefined;
+
private _offset!: number | null;
@Input()
@@ -114,7 +120,7 @@ class EnergyCharts {
maintainAspectRatio: false,
animation: false,
scales: {
- 'x': {
+ x: {
type: 'time',
min: result.begin.getTime(),
max: result.end.getTime() - (this._interval?.inner?.millis || 0),
@@ -133,8 +139,8 @@ class EnergyCharts {
bounds: 'ticks',
},
y: {
- suggestedMax: 0.5,
- suggestedMin: -0.1,
+ max: this.maxY,
+ min: this.minY,
}
},
diff --git a/src/main/angular/src/app/location/energy/location-energy.html b/src/main/angular/src/app/location/energy/location-energy.html
index 66c175a..79ce66b 100644
--- a/src/main/angular/src/app/location/energy/location-energy.html
+++ b/src/main/angular/src/app/location/energy/location-energy.html
@@ -86,6 +86,6 @@
-
+
diff --git a/src/main/angular/src/app/location/energy/location-energy.ts b/src/main/angular/src/app/location/energy/location-energy.ts
index 9e5679b..5183254 100644
--- a/src/main/angular/src/app/location/energy/location-energy.ts
+++ b/src/main/angular/src/app/location/energy/location-energy.ts
@@ -62,6 +62,12 @@ export class LocationEnergy implements OnInit, AfterViewInit, OnDestroy {
return this._o_;
}
+ @Input()
+ maxY: number | undefined = undefined;
+
+ @Input()
+ minY: number | undefined = undefined;
+
@Input()
interval!: Interval;