# Region Map Polygon Line Widths and Legend background Customization

**URL:** <https://discuss.elastic.co/t/region-map-polygon-line-widths-and-legend-background-customization/107088>\
**Category:** Kibana\
**Created:** [November 9, 2017, 6:30pm UTC](https://discuss.elastic.co/t/region-map-polygon-line-widths-and-legend-background-customization/107088 "2017-11-09T18:30:50Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![drfuka](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/drfuka/32/109160_2.png) [@drfuka](https://discuss.elastic.co/u/drfuka)\
**Post date:** [November 9, 2017, 6:30pm UTC](https://discuss.elastic.co/t/region-map-polygon-line-widths-and-legend-background-customization/107088/1 "2017-11-09T18:30:50Z")

</div>

While having fun with RegionMaps with mapserver self hosted geojson requests, I have found a need to alter/remove the line width for the edges of the polygons. Is there any info on how to remove the polygon borders, or change line width/colors? I am not finding docs on how to do this in RegionMaps, so any suggestions would be appreciated.

Also, is there a way to set the background color in the legends (from transparent) so that they are more visible?

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/2/8/28b00536d7fad66b89e0d2f6d667165bb3b73a65.png)

---

<div class="post-metadata">

**Author:** ![drfuka](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/drfuka/32/109160_2.png) [@drfuka](https://discuss.elastic.co/u/drfuka)\
**Post date:** [November 9, 2017, 6:35pm UTC](https://discuss.elastic.co/t/region-map-polygon-line-widths-and-legend-background-customization/107088/2 "2017-11-09T18:35:46Z")

</div>

To better show the problem I am having, Here is the next zoom level out where the lines overtake the polygons in the visualization. I would love it if someone knows how to remove the lines, color them with polygon fill color, or if nothing else, change line width to something incredibly small or 0.

Thanks!

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/9/6/96fb969325ba4d80836f6685ef9a7ff7dfa30691.png)

---

<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:** [November 9, 2017, 10:14pm UTC](https://discuss.elastic.co/t/region-map-polygon-line-widths-and-legend-background-customization/107088/3 "2017-11-09T22:14:29Z")

</div>

hi @drfuka,

can you open an enhancement request for modifying the line-styling:

> **[Build software better, together](https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Felastic%2Fkibana%2Fissues%2Fnew)**
>
> GitHub is where people build software. More than 26 million people use GitHub to discover, fork, and contribute to over 75 million projects.

This isn't possible right now, but you're right, this would be a nice addition. We're looking to introduce some changes to the region-map in 6.1, so could be a good opportunity to add those there as well.

As for changing the background of the legend, that isn't possible either. So I would open an ER for that as well.

Looks cool btw. Can I ask what you are working on? Is that something like a synthetic street-grid or the map of a video game?

---

<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:** [November 10, 2017, 4:29am UTC](https://discuss.elastic.co/t/region-map-polygon-line-widths-and-legend-background-customization/107088/4 "2017-11-10T04:29:52Z")

</div>

In the meantime, if you're not afraid to get your hands dirty, you can always manually modify the Kibana source code.

In your Kibana-foldor, change the `weight` parameter in the `src/core_plugins/region_map/public/choropleth_layer.js` file.

Restart kibana.

e.g.:

> <https://github.com/thomasneirynck/kibana/blob/37fc9495c69fa4f1cb33673520485b4d523e7fb5/src/core_plugins/region_map/public/choropleth_layer.js#L234-L234>

  

> <https://github.com/thomasneirynck/kibana/blob/37fc9495c69fa4f1cb33673520485b4d523e7fb5/src/core_plugins/region_map/public/choropleth_layer.js#L291-L291>

The `weight` param is the line-thickness. Change it to 0 or 1.

For the background of the legend, in `src/core_plugins/tile_map/public/styles/_tilemap.less`, change the background-CSS property to something like `background: rgb(255,255,255)`.

> <https://github.com/thomasneirynck/kibana/blob/599c8c422075a15c4847783e5d433b233fd953c9/src/core_plugins/tile_map/public/styles/_tilemap.less#L19-L19>

When you restart Kibana, the source files will recompile and you should see the changes. Obviously, this is a little hacky, but might get you the result you want.

thx,

---

<div class="post-metadata">

**Author:** ![drfuka](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/drfuka/32/109160_2.png) [@drfuka](https://discuss.elastic.co/u/drfuka)\
**Post date:** [November 14, 2017, 2:28am UTC](https://discuss.elastic.co/t/region-map-polygon-line-widths-and-legend-background-customization/107088/5 "2017-11-14T02:28:33Z")

</div>

Mahalo Thomas et al.  
Worked like a charm:

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

Notes for other newbs like myself.  
You will want to set "console.enabled: false" in your kibana.yml to force the recompile on restart (toggle back to true after or you will be waiting a long time during each restart)... and in my case, I installed as root, so "programatically created and updated" code by user "kibana" on compile did not have access to overwrite files in kibana/optimize/bundles/ . Change permissions or delete as needed to allow dynamic regeneration on the first compile after installation.

---

<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:** [December 2, 2017, 1:13am UTC](https://discuss.elastic.co/t/region-map-polygon-line-widths-and-legend-background-customization/107088/6 "2017-12-02T01:13:39Z")

</div>

I put in this feature request to make line-styling configurable.

> <https://github.com/elastic/kibana/issues/15360>

We're exploring supporting topojson as a format, so flexibility in line-styling will then be even more important, given that we'll have a lot more (and smaller) shapes on a map.

---

<div class="post-metadata">

**Author:** ![drfuka](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/drfuka/32/109160_2.png) [@drfuka](https://discuss.elastic.co/u/drfuka)\
**Post date:** [December 5, 2017, 7:45pm UTC](https://discuss.elastic.co/t/region-map-polygon-line-widths-and-legend-background-customization/107088/7 "2017-12-05T19:45:41Z")

</div>

Thanks... let me know if you would like some help playing with different solutions or in testing.

---

<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:** [January 2, 2018, 7:45pm UTC](https://discuss.elastic.co/t/region-map-polygon-line-widths-and-legend-background-customization/107088/8 "2018-01-02T19:45:50Z")

</div>

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