plotly.js: [Bug] Horizontal Legend Wrapping doesn't account properly for usage of
tags

Reproduction:

  1. Set screen size so narrow that all legend items will be displayed in a vertical fashion, with legend.orientation = "h".
  2. Create two traces where the first one has a very long name that will make the second trace’s name wrap into the next line and do not use <br> in the first traces name.
  3. Put at least one <br> in the second trace’s name.

Here’s an example: https://codepen.io/anon/pen/EdJyQm?editors=0010

If you put a <br> anywhere in the name of trace6, the name of trace7 will be shown fine. If you leave it out and your last trace contains a <br> the second line will be cut off.

Please ping me up if you need further explanation of the problem.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 18 (5 by maintainers)

Commits related to this issue

Most upvoted comments

Just for the record: I found another problem with this. If you have <br> in your trace.name the white background doesn’t follow properly and the name collides with the next trace: grafik

Hey, everyone. Just wanted to know if anyone of the contributors/members has read this, since it isn’t labeled and there’s no comment yet =(…