# Visualize - Change legends font size

**URL:** https://discuss.elastic.co/t/visualize-change-legends-font-size/288260
**Category:** Kibana
**Created:** [November 2, 2021, 7:29pm UTC](https://discuss.elastic.co/t/visualize-change-legends-font-size/288260 "2021-11-02T19:29:21Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Silvy20](https://avatars.discourse-cdn.com/v4/letter/s/b4bc9f/32.png) [@Silvy20](https://discuss.elastic.co/u/Silvy20)
#### Post date: [November 2, 2021, 7:29pm UTC](https://discuss.elastic.co/t/visualize-change-legends-font-size/288260/1 "2021-11-02T19:29:21Z")

</div>

Hi all,

I'm new here and this maybe a stupid question but I didn't found a solution for it. There are a way to increase the size of the text legends in the graphs? I need to work with print screens to put in a PowerPoint presentation and then the legends are very difficult to read (small size).

Any suggestion without change CSS file?

Thanks.

---

<div class="post-metadata">

### Author: ![Rios](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rios/32/95745_2.png) [@Rios](https://discuss.elastic.co/u/Rios)
#### Post date: [November 2, 2021, 8:56pm UTC](https://discuss.elastic.co/t/visualize-change-legends-font-size/288260/2 "2021-11-02T20:56:41Z")

</div>

Well, real question is... are you ready to suffer? 🙂

Answer: Yes, you have to use Custom visualization and play with Vega syntax.  
There are Legend properties and editor,if you need. [Legend | Vega-Lite](https://vega.github.io/vega-lite/docs/legend.html)  
[Vega Editor](https://vega.github.io/editor/#/)  
Copy this at line 86, you will see results.

```auto
encoding: {
    x: {
      // The "key" value is the timestamp in milliseconds. Use it for X axis.
      field: key
      type: temporal
      axis: {title: false} // Customize X axis format
    }
    y: {
      // The "doc_count" is the count per bucket. Use it for Y axis.
      field: doc_count
      type: quantitative
      axis: {title: "Document count"}
    }
    "color": {
       field: "Document count", "type": "nominal"
       "legend": { 
         "title": "test" 
         "fillColor": "red"
         "labelFont": "Verdana"
         "labelFontSize": "20"
       }
    }
  }
}

```

---

<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: [November 30, 2021, 8:57pm UTC](https://discuss.elastic.co/t/visualize-change-legends-font-size/288260/3 "2021-11-30T20:57:34Z")

</div>

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