Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting color with crosstalk dataset will prevent parcoords display #43

Open
paulklemm opened this issue Nov 10, 2020 · 0 comments
Open

Comments

@paulklemm
Copy link

paulklemm commented Nov 10, 2020

When you use parcoords with crosstalk and set a color dimension, the widget will not appear. But when you add a second parcoords plot that does not use crosstalk, it will render all plots perfectly fine.

Minimal Example

sessionInfo() output
R version 4.0.3 (2020-10-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.1 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0

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

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

other attached packages:
[1] magrittr_1.5

loaded via a namespace (and not attached):
 [1] tidyselect_1.1.0       xfun_0.18              purrr_0.3.4            colorspace_1.4-1      
 [5] vctrs_0.3.4            generics_0.0.2         viridisLite_0.3.0      htmltools_0.5.0       
 [9] yaml_2.2.1             plotly_4.9.2.1         rlang_0.4.8            later_1.1.0.1         
[13] pillar_1.4.6           glue_1.4.2             lifecycle_0.2.0        stringr_1.4.0         
[17] munsell_0.5.0          gtable_0.3.0           htmlwidgets_1.5.2.9000 evaluate_0.14         
[21] labeling_0.4.2         knitr_1.30             d3r_0.9.0              fastmap_1.0.1         
[25] httpuv_1.5.4           crosstalk_1.1.0.1      Rcpp_1.0.5             xtable_1.8-4          
[29] renv_0.12.0            promises_1.1.1         scales_1.1.1           DT_0.16               
[33] BiocManager_1.30.10    jsonlite_1.7.1         mime_0.9               farver_2.0.3          
[37] servr_0.20             ggplot2_3.3.2          digest_0.6.26          stringi_1.5.3         
[41] xaringan_0.18          dplyr_1.0.2            shiny_1.5.0            grid_4.0.3            
[45] tools_4.0.3            lazyeval_0.2.2         tibble_3.0.4           parcoords_1.0.0       
[49] crayon_1.3.4           tidyr_1.1.2            pkgconfig_2.0.3        ellipsis_0.3.1        
[53] data.table_1.13.2      rmarkdown_2.5          httr_1.4.2             rstudioapi_0.11       
[57] R6_2.4.1               compiler_4.0.3   

Comment in the no-crosstalk chunk for both widgets to work.

---
title: "Parcoords and Crosstalk"
output: html_document
---

```{r parcoords}
shared_iris <- crosstalk::SharedData$new(iris)
parcoords::parcoords(
  shared_iris,
  color = list(colorBy = "Species"),
  withD3 = TRUE
)
```

```{r dt}
DT::datatable(shared_iris)
```

```{r no-crosstalk}
# parcoords::parcoords(
#   iris,
#   color = list(colorBy = "Species"),
#   withD3 = TRUE
# )
```

Screenshots

Without no-crosstalk chunk.

image

With no-crosstalk chunk.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant