minY/maxY was missing
This commit is contained in:
parent
dc7e57f341
commit
9f24ea08ae
@ -73,10 +73,7 @@ export class EnergyCharts implements AfterViewInit {
|
||||
},
|
||||
bounds: 'ticks',
|
||||
},
|
||||
y: {
|
||||
max: this.maxY,
|
||||
min: this.minY,
|
||||
}
|
||||
y: {},
|
||||
},
|
||||
interaction: {
|
||||
mode: 'index',
|
||||
@ -134,8 +131,13 @@ export class EnergyCharts implements AfterViewInit {
|
||||
this.data.datasets.length = 0;
|
||||
const xScale = this.chart?.chart?.options?.scales?.['x'];
|
||||
if (xScale) {
|
||||
xScale.min = result ? result.begin.getTime() : undefined;
|
||||
xScale.max = result ? result.end.getTime() - (this.interval?.inner?.millis || 0) : undefined;
|
||||
xScale.min = result.begin.getTime();
|
||||
xScale.max = result.end.getTime() - (this.interval?.inner?.millis || 0);
|
||||
}
|
||||
const yScale = this.chart?.chart?.options?.scales?.['y'];
|
||||
if (yScale) {
|
||||
yScale.max = this.maxY;
|
||||
yScale.min = this.minY;
|
||||
}
|
||||
const energyPurchase = result.series.filter(s => s.series.id === location.energyPurchase?.id)[0] || null;
|
||||
const energyDeliver = result.series.filter(s => s.series.id === location.energyDeliver?.id)[0] || null;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user