plotly / plotly/plotly.js

Hovertemplate not using single text value for all data points

Aperta
#5,965 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

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

Descrizione

Hi there 👋, stumbled across this issue while playing around with hovertemplates in Plotly.NET.

The text property can be either set with an array of values (-> every data point gets its own text for hover display), or with a single value (-> every data point gets the same text)

This works well unless the text is used in a hover template. When using an array of text, these values are displayed correctly. But when using a single text for all datums, it does not display on hover.

Expected behavior: Hover template uses the single string of the text property for each hoverlabel
Actual behavior: Hoverlabels display %text

Here is a jsfiddle: https://jsfiddle.net/vsm79h3q/

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

Inizia riproducendo il comportamento di hovertemplate nel jsfiddle collegato, confrontando una proprietà text con valore array con una singola stringa. Traccia la gestione di hovertemplate per i valori di testo scalari e verifica che la modifica completata visualizzi la stessa stringa in ogni hoverlabel invece di %text.

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

Valutazione

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

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.