diff --git a/frontend/src/app/components/graph/graph.component.ts b/frontend/src/app/components/graph/graph.component.ts
index f2eb6c0..d2e8cf2 100644
--- a/frontend/src/app/components/graph/graph.component.ts
+++ b/frontend/src/app/components/graph/graph.component.ts
@@ -20,6 +20,8 @@ export class GraphComponent implements AfterViewInit {
formatSting: string;
@Input()
graphType = 'line';
+ @Input()
+ minMax: number[];
readonly randomId = uuidv4();
@@ -60,6 +62,14 @@ export class GraphComponent implements AfterViewInit {
data[i].color = this.colors[i];
}
+ let axisY: CanvasJS.ChartOptions.ChartAxisY;
+ if (this.minMax) {
+ axisY = {
+ minimum: this.minMax[0],
+ maximum: this.minMax[1]
+ };
+ }
+
const chart = new CanvasJS.Chart(this.randomId, {
animationEnabled: true,
@@ -70,6 +80,7 @@ export class GraphComponent implements AfterViewInit {
horizontalAlign: 'left',
dockInsidePlotArea: true
},
+ axisY,
data
});
diff --git a/frontend/src/app/containers/region-details/region-details.component.html b/frontend/src/app/containers/region-details/region-details.component.html
index f31e3d7..039a475 100644
--- a/frontend/src/app/containers/region-details/region-details.component.html
+++ b/frontend/src/app/containers/region-details/region-details.component.html
@@ -36,25 +36,27 @@
+ [minMax]="[-25, 50]" formatSting="##,##°C">
-
+
-
+
-
+