Skip to content
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

Change legend labels text color according to dark/light theme #15

Open
davide-granello opened this issue Oct 17, 2024 · 0 comments
Open

Comments

@davide-granello
Copy link

Hello, i want to change the legend labels text color according to the theme.
I'm currently setting the color like this:

public function configure(NovaRequest $request): void
  {
    // ... other settings
    
    $this->legend([
      'position' => 'left',
      'labels' => [
        'color' => 'rgb(148,163,184)' // static value not linked to current light/dark mode
      ]
    ]);
  }

A ChartJsWidget class variable like $themeColor would be useful in order to change some settings depending on that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant