From 7ac0e75b29c98e21e414787e19f5e49f68dd1ed2 Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Wed, 30 Apr 2025 21:58:38 -0600 Subject: [PATCH] Allow specifying the user list when opening a StatsViewer --- module/Apps/StatsViewer.mjs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/module/Apps/StatsViewer.mjs b/module/Apps/StatsViewer.mjs index 2de82cd..639b943 100644 --- a/module/Apps/StatsViewer.mjs +++ b/module/Apps/StatsViewer.mjs @@ -47,6 +47,14 @@ export class StatsViewer extends HandlebarsApplicationMixin(ApplicationV2) { }; // #endregion + constructor({ users, ...opts } = {}) { + super(opts); + + if (users != null) { + this._selectedUsers = users; + }; + }; + get activeTableID() { if (this._selectedSubtable) { return `${this._selectedTable}/${this._selectedSubtable}`; @@ -212,6 +220,8 @@ export class StatsViewer extends HandlebarsApplicationMixin(ApplicationV2) { this._graphData = { type: table.graphType, options: { + // this must be true because it won't downsize the graph when false + maintainAspectRatio: true, animation: false, scales: { y: {