plotly / plotly/plotly.R

cannot drag a horizontal or vertical line shape

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

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

plotly.js
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ả

I have a simple editable plot with a horizontal line shape like so

plot_ly() %>%
  layout(
  shapes=list(
    type = "line",  line = list(color = "red"),
    x0 = 0,  x1 = 1, xref="paper",
    y0 = 0, y1 = 0
  )
) %>%
config(editable=TRUE)

My problem is that I cannot drag the line shape. It just does not register (e.g. the pointer always stays a cross-hair and never converts to a hand) no matter how slowly or closely I try to point to the red line: when I click it always zooms and never drags the line. Even if I zoom this to the nano-scale the red line just never gets detected. The weird thing is that if I make this a slanted line (y0=0, y1=1), the problem goes away and I can drag the line shape without problem.

I am doing this from the plot viewer in RStudio, but even within an app it does not work.

I know this will be ascribed to idiosyncrasies of my set-up (I took this code more or less verbatim from an example on dragging a vertical line; this example also does not work for me), so please tell me what about my set-up (see below for details about this) could be causing this. It is very annoying as I really need this basic feature (it is more or less why I decided I will switch to plotly for what I want to do), but at the moment am stuck at this seemingly simple roadblock.

sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-conda_cos6-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS/LAPACK: /.automount/apps/GNU/R/3.5.1_conda/lib/R/lib/libRblas.so

locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8
[8] LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] plotly_4.9.0 ggplot2_3.1.1 promises_1.0.1 shiny_1.2.0

loaded via a namespace (and not attached):
[1] Rcpp_1.0.1 pillar_1.3.1 compiler_3.5.1 later_0.8.0 plyr_1.8.4 tools_3.5.1 digest_0.6.18 viridisLite_0.3.0 jsonlite_1.6 tibble_2.1.1
[11] gtable_0.3.0 pkgconfig_2.0.2 rlang_0.3.4 rstudioapi_0.10 crosstalk_1.0.0 yaml_2.2.0 l1000_1.0 withr_2.1.2 dplyr_0.8.0.1 httr_1.4.0
[21] htmlwidgets_1.3 grid_3.5.1 tidyselect_0.2.5 glue_1.3.1 data.table_1.12.2 R6_2.4.0 tidyr_0.8.3 purrr_0.3.2 magrittr_1.5 scales_1.0.0
[31] htmltools_0.3.6 assertthat_0.2.1 mime_0.6 xtable_1.8-3 colorspace_1.4-1 httpuv_1.5.1 lazyeval_0.2.2 munsell_0.5.0 crayon_1.3.4

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

Bắt đầu với bản tái hiện tối thiểu của plot_ly(), layout(shapes=...) và config(editable=TRUE) trong trình xem biểu đồ, so sánh các đường ngang hoặc dọc với một đường xiên. Theo dõi tương tác với shape có thể chỉnh sửa và xác minh rằng đường bị ảnh hưởng có thể được kéo mà không kích hoạt thao tác thu phóng trong cả trình xem RStudio và một app.

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ó
4/5
Thời gian dự kiến
3-5 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
35/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.