Y-axis changes to hoverformat value when both tickformat and hoverformat are set
Nessuno ha ancora preso questa issue.
- Lingua principale
- JavaScript
- Stelle
- 18.3k
- Fork
- 2k
- Merge medio
- 2g 12h
- PR unite (30g)
- 28
Descrizione
When using Plotly.js, if both tickformat and hoverformat are specified for the y-axis, the y-axis values unexpectedly change to the hoverformat values instead of displaying the tickformat values.
example code:
yaxis2: {
title: { text: 'Strip Widht [mm]' }, // Y-axis title
titlefont: { color: '#004768', size: 8, standoff: 0.1 },
tickfont: { color: '#004768', size: 8 },
domain: [0.15, 0.80],
linecolor: '#004768',
// range based on strip width setpoint + tollerance + 10 mm extra
range: [(tagValues[4] - tagValues[3] - 5), (tagValues[4] + tagValues[3] + 5)],
tickvals: [(tagValues[4] - tagValues[3] - 3),(tagValues[4] - tagValues[3]), tagValues[4], (tagValues[4] + tagValues[3]), (tagValues[4] + tagValues[3] + 3)],
hoverformat: '.2f',
tickformat: '.0f',
zeroline: false
},
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia riproducendo il problema con la configurazione yaxis2 fornita, mantenendo impostati sia tickformat: '.0f' sia hoverformat: '.2f'. Traccia il modo in cui l'asse esegue il rendering delle etichette dei tick e delle etichette hover, quindi verifica che i tick utilizzino tickformat mentre i valori hover mantengano hoverformat.
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
- 48/100