Changing palette and default color in Kibana


(Arnaud Jaspart) #1

Hello,

for kibana-6.0.1-linux-x86_64

We would like to change the palette and the default color in the graphs.
We do not mind if we need to update the code everytime we update for the time being.
I updated:

  • ./src/ui/public/vis/components/color/seed_colors.js (changed the seedColor)
  • ./src/ui/public/vislib/components/color/colormaps.js (added a new palette)

I restarted Kibana, cleaned my browser cache, ...
The colors are the same as initially...
Would you have any idea?

Thank you very much
Arnaud


(Felix Stürmer) #2

Hi @Arnaud_Jaspart,

which type of graph are you using (normal charts, timelion or time series visual builder)? When running Kibana after you made your changes, did you see a notice about optimization/bundling in the Kibana log?

I was able to change the default colors by manipulating the seed_colors.js file you indicated.

As a general note, when modifying the Kibana source it is advisable to use the source from https://github.com/elastic/kibana/tree/6.1 and to run Kibana in development mode to ensure proper compilation. When you are satisfied with your changes you can build your own installation bundle. Patching the code in a release might have unreliable side-effects. (See https://github.com/elastic/kibana/blob/6.1/CONTRIBUTING.md#setting-up-your-development-environment for more details on setting up the development environment and the build requirements.)

Another thing that could override your color mapping changes is the advanced setting visualization:colorMapping. You can check it in Kibana's management section.


(kulkarni) #3

also as mentioned by Felix, you can look into visualization:colorMapping advanced setting. It is configured by default to map counts to blue. This indeed throws a lot of people off ( if its only showing a single color) even after all the changes. Do let us know if this works.

Cheers
Rashmi


(Arnaud Jaspart) #4

Thank you Felix @weltenwort,
I tried visualization:colorMapping. It's good for general terms, like counts...
But for example, I have:

  • a donut with the default bright colors which I would like to change, as well as the palette
  • a USA heatmap which I would like to change to go from yellow to blue.

Changing the code directly from the deployed tar.gz doesn't seem to work.
I'll use the github and set up a devenv, if you think this is why I'm stuck with default colors. (?)

Thanks again for your help and support


(Arnaud Jaspart) #5

Thanks @rashmi, tried it.
But does not answer heatmap and multi-layer donut (too many descriptors).


(Felix Stürmer) #6

It might be that the changes to the source files are not incorporated into the browser bundle when the Kibana server is not running in devopment mode. Let us know if that still does not make a difference.


(system) #7

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.