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
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtFeb 24, 2026, 3:21 AM

Canvas Sparkline: React to theme changes

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
tobiu Feb 24, 2026, 3:20 AM

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