in bar plot bars are in the wrong order
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- R
- Sterne
- 2.7k
- Forks
- 641
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Please briefly describe your problem and what output you expect. If you have a question, please don't use this form, but instead ask on the community forum http://community.plot.ly/c/api/r or stackoverflow http://stackoverflow.com.
Please include a minimal reprex. The goal of a reprex is to make it as easy as possible for me to recreate your problem so that I can fix it. If you've never heard of a reprex before, start by reading https://github.com/tidyverse/reprex#readme, and follow the advice further down the page. Do NOT include session info unless it's explicitly asked for, or you've used reprex::reprex(..., si = TRUE) to hide it away.
Delete these instructions once you have read them.
Brief description of the problem
bar named 3 months must follow bar named "ban". currently, it is between 12 and 6 month bar
library(plotly)
fig <- plot_ly()
fig <- fig %>% add_bars(
x = c("12 months", "6 months", "3 months","ban on short term plans" ),
y = c(-200),
base = c(0),
marker = list(
color = 'red'
),
)
fig <- fig %>% add_bars(
x = c("12 months", "6 months", "3 months","ban on short term plans"),
y = c(-76, -61, -44,-121),
base = c(0),
marker = list(
color = 'grey'
),
name = 'decrease in premiums'
)
fig
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
Reproduziere das Sortierungsproblem anhand des bereitgestellten R-Beispiels, beginnend mit den Einstiegspunkten plot_ly() und add_bars(). Prüfe, wie die kategorialen x-Werte über die beiden Balkentraces hinweg geordnet sind; als erledigt gilt die Aufgabe, wenn der Balken „3 months“ unmittelbar vor „ban on short term plans“ erscheint und nicht zwischen „12 months“ und „6 months“.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- r
- Bereich
- data-visualization
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 38/100