enable arbitrary formatting on x-axis and y-axis tick labels
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 18.8k
- Forks
- 2.8k
- Ø Merge
- 16 Std. 26 Min.
- Gemergte PRs (30 T.)
- 21
Beschreibung
Thanks for the awesome work on this project! It is incredibly useful!
I have a feature request. I work for a hedge fund and we want our plotly graphs to follow a standardized format. I am having a hard time through writing a generic formatting function that formats the x-axis and y-axis tick values.
For instance, if you wanted to set the tick axis to be bold and include a "x" at the end, you would need to do something like:
fig.update_layout(
yaxis = dict(
tickmode = 'array',
tickvals = [1, 2, 3],
ticktext = ["<b>1x</b>", "<b>2x</b>", "<b>3x</b>"]
)
)
Which is pretty inconvenient because you have to specify the tickvals every time you want to do this.
So I was thinking that it could be a good idea to add something like:
fig.update_xaxis(tick_text_formatter=<function that formats a tick value>)
Thoughts?
Again, thanks for the awesome work!
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
Beginne bei den öffentlichen Einstiegspunkten fig.update_layout und fig.update_xaxis und verfolge anschließend, wie Tick-Beschriftungen der x-Achse und der y-Achse dargestellt werden. Definiere das Verhalten und die API des Formatters und überlege, wie Tests eine beliebige Formatierung überprüfen sollten, ohne manuelle tickvals und ticktext zu erfordern.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- plotly, python
- Bereich
- data-visualization
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Aktiv
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 35/100