plotly / plotly/plotly.R

cannot drag a horizontal or vertical line shape

オープン
#1,532 コメント 7 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

plotly.js
主要言語
R
スター
2.7k
フォーク
641
PR マージ指標
30日以内にマージされた PR はありません

説明

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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

plot viewer で plot_ly()、layout(shapes=...)、config(editable=TRUE) の最小限の再現から始め、水平線または垂直線と斜めの線を比較します。編集可能なシェイプの操作を追跡し、RStudio viewer と app の両方で、影響を受ける線をズームを発生させずにドラッグできることを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
r
領域
data-visualization
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。