LearnNewsExamplesServices
Frontmatter
id9283
titleCanvas Sparkline: React to theme changes
stateClosed
labels
bugaicore
assigneestobiu
createdAtFeb 24, 2026, 3:20 AM
updatedAtFeb 24, 2026, 3:21 AM
githubUrlhttps://github.com/neomjs/neo/issues/9283
authortobiu
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtFeb 24, 2026, 3:21 AM

Canvas Sparkline: React to theme changes

Closed v12.0.0 bugaicore
tobiu
tobiu commented on Feb 24, 2026, 3:20 AM

The Sparkline canvas widget does not update its colors when the global application theme changes (e.g., to dark mode) because the theme config is only passed on initial registration, but updateConfig in the worker does not handle it dynamically.

Resolution:

  • Updated updateConfig in src/canvas/Sparkline.mjs to apply theme changes and trigger a redraw.
  • Evaluated theme: me.theme?.includes('dark') ? 'dark' : 'light' inline inside afterSetOffscreenRegistered in src/component/Sparkline.mjs to ensure the correct string is passed.
tobiu added the bug label on Feb 24, 2026, 3:20 AM
tobiu added the ai label on Feb 24, 2026, 3:20 AM
tobiu added the core label on Feb 24, 2026, 3:20 AM
tobiu assigned to @tobiu on Feb 24, 2026, 3:20 AM
tobiu referenced in commit a1db13e - "fix(canvas): React to theme changes (#9283) on Feb 24, 2026, 3:20 AM
tobiu
tobiu Feb 24, 2026, 3:20 AM

The fix has been implemented and pushed to the dev branch.

tobiu closed this issue on Feb 24, 2026, 3:21 AM