Danny Lieberman
Danny Lieberman

Reputation: 293

Is it possible to control the colors of the bars in Kibana?

I'm collecting clinical dosing data in elastic search. the mapping looks like this:

"mappings" : {
  "dosing": {
  "properties" : {
    "sitename" : {"type" : "string", "index" : "not_analyzed"},
    "subjectlabel" : {"type" : "string", "index" : "not_analyzed"},
    "visitnumber"  : {"type" : "integer"},
    "metric" : {"type" : "string"},
    "what"   : {"type" : "string"},
    "risk"   : {"type" : "string"},
  }

}

Risk is a string with a low, mid or high value - using an Items panel - I produce a chart with 3 bars - for High, Mid and Low

I have not been able to figure out how to change the colors of the bars - I'm the default green, yellow and blue - which doesn't really work for high, mid and low risk.

The Kibana documentation and other posts in Stackoverflow relate to changing the colors of queries - but this is a very basic question of how to change the colors of the bars (or pie sections)

Seems like a pretty basic requirement for a dashboard. Thanks Danny

Upvotes: 3

Views: 4359

Answers (1)

Julien Palard
Julien Palard

Reputation: 11566

Using Kibana 3 you have different possibilities to change colors, but every time, color is picked from the query color.

Where you have more control is: Using a topN query and a "hits" panel, bars will appear using variations of the query color, this will not permit you to have a "red orange green" pie.

To get a "red orange green" view you may setup a query for each of your kind of data (high, mid, low in your case), assign them desired colors, and use a "histogram" panel with in the section "queries" you choose "selected" and select your three sources. You also may want to alias your three sources so legend will be more readable.

However I don't know any way to get a pie with chosen colors.

Upvotes: 1

Related Questions