Skip to content

Bug: updateThemeOptions always reset palette to default #5041

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
coder-johnz opened this issue May 19, 2025 · 0 comments
Open

Bug: updateThemeOptions always reset palette to default #5041

coder-johnz opened this issue May 19, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@coder-johnz
Copy link

The bug is described in the issue: apexcharts/Blazor-ApexCharts#605
I suggest to change the updateThemeOptions function to below. Prefer to use the options provided by user.

  updateThemeOptions(options) {
    options.chart = options.chart || {}
    options.tooltip = options.tooltip || {}
    const mode = options.theme.mode
    const palette = options.theme.palette
        ? options.theme.palette
        : mode === 'dark'
        ? 'palette4'
        : 'palette1'
    const foreColor = options.chart.foreColor
        ? options.chart.foreColor
        : mode === 'dark'
        ? '#f6f7f8'
        : '#373d3f'

    options.tooltip.theme = mode || 'light'
    options.chart.foreColor = foreColor
    options.theme.palette = palette

    return options
  }
@coder-johnz coder-johnz added the bug Something isn't working label May 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant