plotly / plotly/plotly.R

in bar plot bars are in the wrong order

Đang mở
#2,180 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Ngôn ngữ chính
R
Star
2.7k
Fork
641
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Tái hiện vấn đề về thứ tự từ ví dụ R được cung cấp, bắt đầu với các entry point plot_ly() và add_bars(). Kiểm tra cách các giá trị x phân loại được sắp xếp giữa hai bar trace; được xem là hoàn tất khi thanh “3 months” xuất hiện ngay trước “ban on short term plans” thay vì nằm giữa “12 months” và “6 months”.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
r
Lĩnh vực
data-visualization
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
38/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.