# Adding static legend in Kibana dashboards

**URL:** https://discuss.elastic.co/t/adding-static-legend-in-kibana-dashboards/273759
**Category:** Kibana
**Created:** [May 23, 2021, 2:05pm UTC](https://discuss.elastic.co/t/adding-static-legend-in-kibana-dashboards/273759 "2021-05-23T14:05:07Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Roy\_Levy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/roy_levy/32/61613_2.png) [@Roy\_Levy](https://discuss.elastic.co/u/Roy_Levy)
#### Post date: [May 23, 2021, 2:05pm UTC](https://discuss.elastic.co/t/adding-static-legend-in-kibana-dashboards/273759/1 "2021-05-23T14:05:07Z")

</div>

I'm trying to add a static legend to my Kibana dashboard in order to mark things in TSVB visualization.  
I'm using color in the TSVB visualization and am trying to explain the colors in a static legend:

![image](https://us1.discourse-cdn.com/elastic/original/3X/4/3/43ac6f83878eab0c7ee8147ea9bda779579b0614.png)

I want it to be a very simple legend with 4 static colors and values.  
Is there any way to do it in a dashboard?

---

<div class="post-metadata">

### Author: ![AClerk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aclerk/32/55297_2.png) [@AClerk](https://discuss.elastic.co/u/AClerk)
#### Post date: [May 24, 2021, 3:02am UTC](https://discuss.elastic.co/t/adding-static-legend-in-kibana-dashboards/273759/2 "2021-05-24T03:02:48Z")

</div>

[MARKDOWN](https://www.elastic.co/guide/en/kibana/current/enhance-dashboards.html#add-text)?

---

<div class="post-metadata">

### Author: ![AClerk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aclerk/32/55297_2.png) [@AClerk](https://discuss.elastic.co/u/AClerk)
#### Post date: [May 24, 2021, 3:19am UTC](https://discuss.elastic.co/t/adding-static-legend-in-kibana-dashboards/273759/3 "2021-05-24T03:19:39Z")

</div>

Maybe [Vega](https://vega.github.io/) is better as colours in markdown is not supported.

Example:

```auto
{
  "$schema": "https://vega.github.io/schema/vega/v3.json",
  "autosize": {"type": "fit", "resize": true},
  "background": "#000000"
  "padding": 5,
  "marks": [
        {
      "type": "text",
      "encode": {
        "update": {
          "text": { "value": "Good" },
          "align": { "value": "center"},
          "baseline": { "value": "middle"},
          "fill": { "value": "#33FF61"}
          "x": { "signal": "width/2" },
          "y": { "signal": "height/3" },
          "fontSize": { "value": 45 }
        }
      }
    }
    ,
            {
      "type": "text",
      "encode": {
        "update": {
          "text": { "value": "Bad" },
          "align": { "value": "center"},
          "baseline": { "value": "middle"},
          "fill": { "value": "#FFC733"}
          "x": { "signal": "width/2" },
          "y": { "signal": "height/2" },
          "fontSize": { "value": 45 }
        }
      }
    }
    ,
            {
      "type": "text",
      "encode": {
        "update": {
          "text": { "value": "Ugly" },
          "align": { "value": "center"},
          "baseline": { "value": "middle"},
          "fill": { "value": "#FF4933"}
          "x": { "signal": "width/2" },
          "y": { "signal": "height/1.5" },
          "fontSize": { "value": 45 }
        }
      }
    }
  ]
}

```

 ![2021-05-24 13_17_09-Window](https://us1.discourse-cdn.com/elastic/original/3X/7/0/705b432f121d7e2456a4d8ee2ca153a9a6162418.png)

---

<div class="post-metadata">

### Author: ![Roy\_Levy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/roy_levy/32/61613_2.png) [@Roy\_Levy](https://discuss.elastic.co/u/Roy_Levy)
#### Post date: [May 24, 2021, 8:01am UTC](https://discuss.elastic.co/t/adding-static-legend-in-kibana-dashboards/273759/4 "2021-05-24T08:01:44Z")

</div>

Thank you, That really helped!

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [June 21, 2021, 8:02am UTC](https://discuss.elastic.co/t/adding-static-legend-in-kibana-dashboards/273759/5 "2021-06-21T08:02:03Z")

</div>

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