How do you change the background colour in Grafana?

纵然是瞬间 提交于 2020-01-24 01:46:08

问题


I want to modify the dark theme in Grafana so that it uses #000000 as the background colour.

I have seen "How to change default black color of Grafana", however those answers only tell you how to choose between the light and the dark themes.

I also see that How to Customize Your Grafana Theme recommends editing the _variables.dark.scss file, however I cannot see where this is located, as it is not in the public/sass directory as the post suggests.

Finally, I also see that _variables.dark.generated.scss tells you to Edit grafana-ui/src/themes/_variables.dark.scss.tmpl.ts to update template, however I cannot find that file either.

Could you point me in the right direction, please?


回答1:


I found the same sites as you and was frustrated at first. Fortunately I then found the Grafana plugin "Boom Theme Panel" (https://grafana.com/grafana/plugins/yesoreyeram-boomtheme-panel).

It allows you to define a background image or to override the background color under "Custom Style / CSS Override" with the following settings:

.main-view {
  background-color: #000000; 
}


来源:https://stackoverflow.com/questions/59088594/how-do-you-change-the-background-colour-in-grafana

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!