From a92ad2b817b2c28b26e869897e03c14d30d0f991 Mon Sep 17 00:00:00 2001 From: Petri Hienonen Date: Fri, 14 Nov 2025 13:23:58 +0200 Subject: Add histogram --- app/main.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/main.js') diff --git a/app/main.js b/app/main.js index da52152..7adb227 100644 --- a/app/main.js +++ b/app/main.js @@ -47,6 +47,7 @@ export class App { // Create sidebar instance this.#sidebar = new Sidebar( + null, this.#filters, this.#weights, () => { @@ -186,6 +187,7 @@ export class App { this.#sidebar.updateDistricts(this.collection.houses); this.#sidebar.setAreaColorParameter(this.#areaParameter); + this.#sidebar.updateHistogram(this.#filtered, this.#houseParameter); const stats = App.#getStats(this.#filtered); this.#stats.replaceWith(stats); @@ -228,6 +230,8 @@ export class App { const stats = App.#getStats(this.#filtered); this.#stats.replaceWith(stats); this.#stats = stats; + + this.#sidebar.updateHistogram(this.#filtered, this.#houseParameter); } /** -- cgit v1.2.3-70-g09d2