How to increase the height of the legend without shrinking the chart?

I have already tried this solution, https://github.com/plotly/plotly.js/commit/f98d1063bc8e93b05c403f57548f9e719a548ed0

When we have legends beyond 15, it is getting very tricky to select legends.