plotly / plotly/plotly.js

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

Aperta
#7,665 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

feature P2
Lingua principale
JavaScript
Stelle
18.3k
Fork
2k
Merge medio
2g 12h
PR unite (30g)
28

Descrizione

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.)

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

La richiesta riguarda il posizionamento delle annotazioni e delle immagini del layout, usando come riferimento il comportamento esistente di title_xref e title_yref. Inizia tracciando il modo in cui le opzioni xref e yref vengono gestite per annotazioni e immagini, quindi confrontalo con il posizionamento del titolo rispetto al container. Il lavoro è completato quando container è supportato sia per le annotazioni sia per le immagini senza regressioni nel posizionamento rispetto all'asse o nell'area del grafico; la questione delle dimensioni dell'immagine in pixel fissi potrebbe richiedere un ambito separato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
javascript
Ambito
data-visualization
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
48/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.