Skip to content

Variable Importance chart: relative importance, fix label truncation, resizable sidebar#6

Merged
jrkasprzyk merged 3 commits intomainfrom
copilot/update-variable-importance-chart
May 7, 2026
Merged

Variable Importance chart: relative importance, fix label truncation, resizable sidebar#6
jrkasprzyk merged 3 commits intomainfrom
copilot/update-variable-importance-chart

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 5, 2026

The Variable Importance panel showed raw rpart scores (not meaningful to end users), truncated long variable names at 110 px, and had no way to resize the panel.

Changes

Relative importance display

  • renderImportance() now shows each variable's share of total importance as a percentage (val / Σall * 100) rather than the raw rpart score
  • Bar widths remain normalised to the top-ranked variable for visual clarity
const total = entries.reduce((sum, [, v]) => sum + v, 0);
const relPct = total > 0 ? (val / total) * 100 : 0;
// displays "19.4%" instead of "121.160"

Fix label truncation

  • Replaced the rigid 3-column grid (110px 1fr 50px) with a 2-row stacked layout: name + percentage on row 1, full-width bar on row 2
  • Names like cumulative_EndOf_WY3 are now fully visible; ellipsis only triggers for extreme lengths

Resizable sidebar

  • Added a <div id="resize-handle"> drag handle between canvas and sidebar in the HTML grid
  • Grid template: 1fr 5px var(--sidebar-w) — sidebar width driven by a CSS custom property (--sidebar-w: 340px)
  • initResizeHandle() handles mousedown/mousemove/mouseup, clamping width to [220, 640] px
  • DEFAULT_SIDEBAR_W = 340 constant keeps the JS fallback in sync with the CSS default

@vercel
Copy link
Copy Markdown

vercel Bot commented May 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
arborview Ready Ready Preview, Comment May 5, 2026 7:54pm

… resizable sidebar

Agent-Logs-Url: https://github.com/jrkasprzyk/ArborView/sessions/f1f36884-098f-4d04-a9ef-f8014ec8008b

Co-authored-by: jrkasprzyk <4161712+jrkasprzyk@users.noreply.github.com>
Copilot AI changed the title [WIP] Update variable importance chart with relative importance and resizing Variable Importance chart: relative importance, fix label truncation, resizable sidebar May 5, 2026
Copilot AI requested a review from jrkasprzyk May 5, 2026 19:54
@jrkasprzyk jrkasprzyk requested a review from zaca1902 May 5, 2026 19:59
@jrkasprzyk jrkasprzyk marked this pull request as ready for review May 5, 2026 21:29
Copy link
Copy Markdown
Collaborator

@zaca1902 zaca1902 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything here looks good to me! Once I get my Vercel account working (it is currently running into authentication issues), I can also double-check the test deployment from this branch.

Combine tab/panel layout from main with resize-handle from PR branch.
Resize handle placed between canvas section and sidebar, preserving both features.
Copy link
Copy Markdown
Owner

@jrkasprzyk jrkasprzyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks good here.

@jrkasprzyk jrkasprzyk merged commit 491c184 into main May 7, 2026
@jrkasprzyk jrkasprzyk deleted the copilot/update-variable-importance-chart branch May 7, 2026 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Variable Importance chart: feature requests

3 participants