diff --git a/angular-client/src/pages/graph-page/graph-page.component.ts b/angular-client/src/pages/graph-page/graph-page.component.ts index 9ab40eac..6e25c894 100644 --- a/angular-client/src/pages/graph-page/graph-page.component.ts +++ b/angular-client/src/pages/graph-page/graph-page.component.ts @@ -65,7 +65,7 @@ export default class GraphPage implements OnInit { this.setSelectedDataType = (dataType: DataType) => { this.selectedDataType.next(dataType); - this.selectedDataTypeValuesSubject.next([]); + this.selectedDataTypeValuesSubject = new BehaviorSubject([]); if (this.realTime) { if (this.subscription) this.subscription.unsubscribe(); const key = dataType.name; diff --git a/angular-client/src/pages/graph-page/graph/graph.component.ts b/angular-client/src/pages/graph-page/graph/graph.component.ts index 71b0cf5e..f55cc015 100644 --- a/angular-client/src/pages/graph-page/graph/graph.component.ts +++ b/angular-client/src/pages/graph-page/graph/graph.component.ts @@ -162,6 +162,15 @@ export default class Graph implements OnChanges { this.data = new Map(); this.isSliding = false; + //set range to undefined + this.chart.updateOptions({ + ...this.options, + xaxis: { + ...this.options.xaxis, + range: undefined + } + }); + this.valuesSubject.subscribe((values: GraphData[]) => { values.forEach((value) => { if (!this.data.has(value.x)) {