plotly / plotly/plotly.R

cannot drag a horizontal or vertical line shape

Ouverte
#1,532 7 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

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

Description

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

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

Commencez par la reproduction minimale de plot_ly(), layout(shapes=...) et config(editable=TRUE) dans le visualiseur de graphiques, en comparant des lignes horizontales ou verticales avec une ligne inclinée. Suivez l’interaction avec la forme modifiable et vérifiez que la ligne concernée peut être déplacée par glissement sans déclencher de zoom, à la fois dans le visualiseur RStudio et dans une app.

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é
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

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