Kibana bar chart legend set constant color


I've a simple requirement where in I need to set constant color for bar and legends.
Error:Always red, Success:Always greeen,Initialize:Always yellow...etc
The current behaviour of kibana dosen't fullfill thisrequirement,Whenever I select timeranges say
24 hours,15 min,month week etc...the color cahnges automatically.I'd require this to be non changing and always constant.
I'm not sure whether this is bug or any possibilities to achieve this in kibana? , any time range selected the color should not change as here Red indicates Alert,Green success etc.
ELK version used:7.9.1

Many Thanx


We have an open feature request for this in Lens, but it hasn't been implemented yet.

I think the best way to customize colors on a visualization is using TSVB. Here's an example where I set specific colors for HTTP responses.

Hi @nickpeihl ,

Thanx for your time to look into this,My intention is to use Vertical bar and maintain constant color.
I'm not sure how can I set non changing color.Is there a possibility or way for vertical or horizontal bar visuals?
Kibana 7.9.1



I do not believe it is possible to keep constant colors in the legacy visualizations.

Hello All,

The work around may be used for above issue,gets applied global level,not supported for individual visual or dashboard to persist color.

Advanced settings in kibana:

Hey @PRASHANT_MEHTA. There are 2 ways to accomplish what you want:

  • The one is what you mention above and is global
  • The second one is clicking on the legend and select a color (from the given ones)

My screenshot is from a more recent kibana version but it is also available on 7.9

Hi @Stratoula_Kalafateli ,

Thanx fot your time to look into this.For now global level works fine.The clicking on legend and setting color dosen't seems to work fine.
While setting the colors from legend for any given visualization the color dosen't persist.I'm not sure why this happens or may be bug.
Using kibana 7.9.1 and here on vertical,Horizontal or pie the color when set from legend dosen't persist.Everytime dashbaord is reloaded or seen,then the color changes.
Global level was saviour for now as usecases require particular color to be set for specifying meaning in bar. ex:red-error,success-green.
Are you aware where is this option on visual : uiStateJason? , I tried searching but now aware exaclty where it could be found.

Many Thanx

Yes I remember we had a bug back then so possibly you are hitting this. This is saved on the saved object on the uiStateJson property. You can't see it on the editor. Except from the legend of course that depicts the overwrites

We are working in Lens to give this capability and it will work with more efficient way.

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