|
|
@@ -19,6 +19,18 @@ export class YearGraphComponent {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+ animateGraphs() {
|
|
|
+ const MILLISECONDS_TO_ANIMATE = 100 as const;
|
|
|
+ let i = 1;
|
|
|
+ for (const year of this.sdmDihService.years) {
|
|
|
+ setTimeout(() => {
|
|
|
+ this.selectedYear = year;
|
|
|
+ this.redrawGraphs();
|
|
|
+ }, MILLISECONDS_TO_ANIMATE * i);
|
|
|
+ i++;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
drawGraph(region: string) {
|
|
|
const year = this.selectedYear.toString().includes('.')
|
|
|
? this.selectedYear
|