diff --git a/src/app/components/results-menu/timeseries-results-menu/timeseries-results-menu.component.html b/src/app/components/results-menu/timeseries-results-menu/timeseries-results-menu.component.html index 697e18f46..a8f10e153 100644 --- a/src/app/components/results-menu/timeseries-results-menu/timeseries-results-menu.component.html +++ b/src/app/components/results-menu/timeseries-results-menu/timeseries-results-menu.component.html @@ -139,7 +139,8 @@ [zoomIn$]="zoomInChart$" [zoomToFit$]="zoomToFitChart$" [zoomOut$]="zoomOutChart$" - [chartData]="chartData"> + [chartData]="chartData" + [isLoading]="isLoading"> diff --git a/src/app/components/results-menu/timeseries-results-menu/timeseries-results-menu.component.ts b/src/app/components/results-menu/timeseries-results-menu/timeseries-results-menu.component.ts index 1f37fef79..155507b2e 100644 --- a/src/app/components/results-menu/timeseries-results-menu/timeseries-results-menu.component.ts +++ b/src/app/components/results-menu/timeseries-results-menu/timeseries-results-menu.component.ts @@ -62,6 +62,8 @@ export class TimeseriesResultsMenuComponent implements OnInit, OnDestroy { public dateRange = []; public totalPoints = 0; + public isLoading = false; + constructor( private store$: Store, private screenSize: ScreenSizeService, @@ -180,8 +182,10 @@ export class TimeseriesResultsMenuComponent implements OnInit, OnDestroy { this.timeseries_subscription.unsubscribe(); } this.chartData.next(null); + this.isLoading = true; this.timeseries_subscription = this.netcdfService.getTimeSeries(geometry).pipe(first()).subscribe(data => { this.chartData.next(data); + this.isLoading = false; let test_products = []; this.totalPoints = Object.keys(data).length - 1; diff --git a/src/app/components/timeseries-chart/timeseries-chart.component.html b/src/app/components/timeseries-chart/timeseries-chart.component.html index fb27f0453..4929d0482 100644 --- a/src/app/components/timeseries-chart/timeseries-chart.component.html +++ b/src/app/components/timeseries-chart/timeseries-chart.component.html @@ -4,7 +4,7 @@
- @if(dataSource.length <= 0){ + @if(isLoading){
diff --git a/src/app/components/timeseries-chart/timeseries-chart.component.ts b/src/app/components/timeseries-chart/timeseries-chart.component.ts index 335a0bf8e..bed99c137 100644 --- a/src/app/components/timeseries-chart/timeseries-chart.component.ts +++ b/src/app/components/timeseries-chart/timeseries-chart.component.ts @@ -45,6 +45,7 @@ export class TimeseriesChartComponent implements OnInit, OnDestroy { private selectedScene: string; + @Input() isLoading: boolean = false; private subs = new SubSink(); constructor(