plotly / plotly/plotly.R

in bar plot bars are in the wrong order

Ouverte
#2,180 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Langage dominant
R
Étoiles
2.7k
Forks
641
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Reproduisez le problème d’ordre à partir de l’exemple R fourni, en commençant par les points d’entrée plot_ly() et add_bars(). Vérifiez comment les valeurs catégorielles de x sont ordonnées entre les deux traces de barres ; c’est terminé lorsque la barre « 3 months » apparaît immédiatement avant « ban on short term plans » plutôt qu’entre « 12 months » et « 6 months ».

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
r
Domaine
data-visualization
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
38/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.