plotly / plotly/plotly.py

Support text wrap for titles and subtitles

Open
#4,819 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
18.8k
Forks
2.8k
Avg merge
16h 26m
Merged PRs (30d)
21

Description

Titles and subtitles in Plotly charts overflow by default. It's impossible to have them wrap.

With subtitle support, having long strings in this area is more common (and more useful), so we should automatically wrap text if it gets too long in the title or subtitle area.

fig = px.line(x=[1,2,3], y=[4,5,6], title="This is a really really really really really really really really really really really really really really reallyy long title")
fig.update_layout(title_subtitle_text="This is a really really really really really really really really really really really really really really  really really really really really really really long subtitle")
fig

Image

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 with the px.line example and the update_layout(title_subtitle_text=...) entry point to trace how chart titles and subtitles are passed into rendering. Confirm the behavior with long strings like those in the issue; done means both title and subtitle text wrap automatically instead of overflowing.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-visualization
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.