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.
The Sparkline canvas widget does not update its colors when the global application theme changes (e.g., to dark mode) because the
themeconfig is only passed on initial registration, butupdateConfigin the worker does not handle it dynamically.Resolution:
updateConfiginsrc/canvas/Sparkline.mjsto applythemechanges and trigger a redraw.theme: me.theme?.includes('dark') ? 'dark' : 'light'inline insideafterSetOffscreenRegisteredinsrc/component/Sparkline.mjsto ensure the correct string is passed.