Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

[Feature request] Allow annotations and layout images to be positioned relative to the container, not just the x/y axes or plotting area

Offen
#7,665 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
48/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
javascript

Rechercherichtung

Die Anfrage betrifft die Positionierung von Annotationen und Layout-Bildern, wobei das bestehende Verhalten von title_xref und title_yref als Referenz dient. Beginne damit, nachzuverfolgen, wie die Optionen xref und yref für Annotationen und Bilder verarbeitet werden, und vergleiche dies anschließend mit der Positionierung des Titels relativ zum Container. Als abgeschlossen gilt, wenn container sowohl für Annotationen als auch für Bilder unterstützt wird, ohne die Platzierung an der Achse oder im Plotbereich zu beeinträchtigen; die Frage der festen Pixel-Bildgröße benötigt möglicherweise einen separaten Umfang.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

feature P2

One thing I really appreciate about title positioning in Plotly is that I can set title locations relative to the container, not just the plotting area or x axis, via the title_xref and title_yref settings. This makes it much easier to achieve consistent title placement across different charts, as many different factors can change the shape of the plotting area.

Would it be possible to add container as an xref and yref option for annotations and images also? I've been needing to manually adjust these across charts, which can take a decent amount of time. (For PNG exports, I can achieve consistent placements by adding them in via Pillow, but this won't help for HTML-based charts.)

Also, one somewhat-related question (which I'm happy to move to a separate issue if needed): Is there a way to ensure that an image will always be the same size, in pixels, as long as the width of the chart (in pixels) is always the same? It appears that, even when the sizex and sizey settings stay the same, the image size can vary. (Since these values are relative to the chart's area, though, this is probably to be expected. But being able to specify a fixed size, e.g. 300x200px, would be fantastic.)

Vorherrschende Sprache
JavaScript
Sterne
18.3k
Forks
2k
Ø Merge
2 T. 10 Std.
Gemergte PRs (30 T.)
30

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus plotly/plotly.js

Alle Issues in plotly/plotly.js

Ähnliche Issues

Weitere Issues zu JavaScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.