Word wrap for long labels
Offen
Dieses Issue hat noch niemand übernommen.
feature
P3
- Vorherrschende Sprache
- JavaScript
- Sterne
- 18.3k
- Forks
- 2k
- Ø Merge
- 2 T. 12 Std.
- Gemergte PRs (30 T.)
- 28
Beschreibung
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)
- 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 simplewrap: trueoption
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, {})
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Das Issue enthält ein Plotly.newPlot-Beispiel, nennt aber weder eine Repository-Datei noch einen Test. Beginne damit, nachzuverfolgen, wie Plotly.newPlot kategoriale Beschriftungen anordnet und rendert, und identifiziere dann die relevanten Beschriftungstests; abgeschlossen ist die Aufgabe, wenn eine Wrapping-Option lange Beschriftungen wie angefordert neu umbricht und explizite br-Zeilenumbrüche beibehält.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript
- Bereich
- data-visualization
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100