plotly / plotly/plotly.js

Line breaks don't work on modebarbuttons

Open
#6,722 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug P3
Dominant language
JavaScript
Stars
18.3k
Forks
2k
Avg merge
2d 12h
Merged PRs (30d)
28

Description

I’m creating a button on the modebarbuttons which is supposed to hold a small description of the graph (see image below).

28ef2abf5d14ac4607148dc380b7a46d716e8bc1

I'm using the field name for that, as it shows up when the mouse is hovered. However, depending on the screen size, the description may be long. Is it possible to add a line break in that description? Both <br> and \n don’t seem to work. Is this intended?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the modebarbuttons implementation and trace how the name field becomes the hover description. Check the current browser behavior for <br> and newline values, then define completion as a supported line break appearing correctly in the button description at different screen sizes.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
data-visualization, frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.