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

Custom theming: What is the recomended approach? #3924

Open
petterhoel opened this issue Dec 9, 2024 · 2 comments
Open

Custom theming: What is the recomended approach? #3924

petterhoel opened this issue Dec 9, 2024 · 2 comments

Comments

@petterhoel
Copy link

I know there are some nice pre-made themes. But if I need to use specific colors or fonts, what is the recommended approach?

@netil netil added the question label Dec 10, 2024
@netil
Copy link
Member

netil commented Dec 10, 2024

Hi @petterhoel, we don't provide any documentation about it, but it isn't difficult to make your own.

If you check one of the theme css file, can find every comments what element or part is belong to.

My recommendation about styling is,

  • Render the chart from the browser and open devtool to check dom structure and its elements with class names
  • Basically, each class is the key to specify/define the style you need.
    • So, take one of the theme css file as a basis to construct own one.
  • Add or update class rules as your needs. And some keys are:
    • Common style rules are defined at the top of the file, so it'll be easier to make some updates.
    • Below class will be utilized as default color set. Update hex color pattern with url("...") for default colors
      .bb-color-pattern {
          background-image: url("#00c73c;#fa7171;#2ad0ff;#7294ce;#e3e448;#cc7e6e;#fb6ccf;#c98dff;#4aea99;#bbbbbb;");
      }

@petterhoel
Copy link
Author

That sounds very doable. Many thanks ☺️

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

No branches or pull requests

2 participants