Skip to content

Canvas Sparkline: React to theme changes #9283

@tobiu

Description

@tobiu

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.

Metadata

Metadata

Assignees

Labels

aibugSomething isn't workingcoreCore framework functionality

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions