Skip to content

Word wrap for long labels #382

Open
Open
@eugenesvk

Description

@eugenesvk

Is there an option to reflow long text labels?

  • For example, a long label without reflow (plotly tries to autocorrect by slanting the labels instead of reflowing the text, but it still doesn't fit)
    plotlylonglabels1
  • And a simple manual fix with a few <br> in the code that I'd like to have Plotly be able to do with a simple wrap: true option
    plotlylonglabels2

JS code for this chart

var data = [{
// first screenshot labels
    //x: ['giraffes', 'orangutans', "Very Long Text Label That Doesn't Fit Properly"],
// second screenshot labels
    x: ['giraffes', 'orangutans', "Very Long<br>Text Label That<br>Doesn't Fit<br>Properly"],
    y: [20, 14, 23],
    type: 'bar'
}]
Plotly.newPlot('PlotlyDivSimple', data, {})

Metadata

Metadata

Assignees

Labels

P3backlogfeaturesomething new

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions