# Legend width shouldn't be hard-coded

**URL:** https://discuss.elastic.co/t/legend-width-shouldnt-be-hard-coded/99023
**Category:** Kibana
**Created:** [August 31, 2017, 3:38pm UTC](https://discuss.elastic.co/t/legend-width-shouldnt-be-hard-coded/99023 "2017-08-31T15:38:59Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![bh9](https://avatars.discourse-cdn.com/v4/letter/b/c37758/32.png) [@bh9](https://discuss.elastic.co/u/bh9)
#### Post date: [August 31, 2017, 3:38pm UTC](https://discuss.elastic.co/t/legend-width-shouldnt-be-hard-coded/99023/1 "2017-08-31T15:38:59Z")

</div>

The legend width is hard coded to 150px. This causes problems for entries with long names and is compounded with long lists of entries by the scroll bar. While I appreciate that it should have an upper and lower bound, it shouldn't be hard coded. It seems the current value was set to lock the width of the colour palette. I would replace `width: 150px;` (`kibana/src/ui/public/vislib/styles/_legend.less line 44`) with

```auto
min-width: 150px;
max-width: 250px;

```

Feel free to suggest different values for min and max width if you think these are wrong.

---

<div class="post-metadata">

### Author: ![thomasneirynck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thomasneirynck/32/23313_2.png) [@thomasneirynck](https://discuss.elastic.co/u/thomasneirynck)
#### Post date: [August 31, 2017, 6:24pm UTC](https://discuss.elastic.co/t/legend-width-shouldnt-be-hard-coded/99023/2 "2017-08-31T18:24:23Z")

</div>

hi @bh9,

these type of improvements are better logged in the Kibana repo. [https://github.com/elastic/kibana/issues/new](https://github.com/elastic/kibana/issues/new).

Or, better yet, since you are already suggesting a resolution, I'd recommend submitting a pull request for this. Your fix then becomes part of the Kibana commit-history with your name on it. Guidelines for submitting PRs can be found here: [https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md).

---

<div class="post-metadata">

### Author: ![bh9](https://avatars.discourse-cdn.com/v4/letter/b/c37758/32.png) [@bh9](https://discuss.elastic.co/u/bh9)
#### Post date: [September 1, 2017, 8:20am UTC](https://discuss.elastic.co/t/legend-width-shouldnt-be-hard-coded/99023/3 "2017-09-01T08:20:28Z")

</div>

OK, will do, last time I made an issue, I was directed here instead so I thought I'd try here first

Update: issue is here: [https://github.com/elastic/kibana/issues/13813](https://github.com/elastic/kibana/issues/13813)

---

<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: [September 29, 2017, 8:20am UTC](https://discuss.elastic.co/t/legend-width-shouldnt-be-hard-coded/99023/4 "2017-09-29T08:20:39Z")

</div>

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