Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/earowang/unlayout
Unlayout the layout of HTML widgets
https://github.com/earowang/unlayout
Last synced: 23 days ago
JSON representation
Unlayout the layout of HTML widgets
- Host: GitHub
- URL: https://github.com/earowang/unlayout
- Owner: earowang
- License: other
- Created: 2020-05-27T23:33:17.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-05-27T23:36:35.000Z (over 4 years ago)
- Last Synced: 2024-08-09T02:17:14.009Z (3 months ago)
- Language: JavaScript
- Size: 655 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - earowang/unlayout - Unlayout the layout of HTML widgets (JavaScript)
README
---
output: github_document
---```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```# unlayout
Hmm, I'm just not there yet for laying out plots when doing EDA, and hence `unlayout()` first (and drag them towards a better layout ;)).
This package is an html widget that simply wraps the `draggable()` method from the [interact.js](https://interactjs.io) library. It works with or without Shiny.
## Installation
You can install the dev version of unlayout from Github with:
``` r
# install.packages("remotes")
remotes::install_github("earowang/unlayout")
```## Get started
```{r unlayout, eval = FALSE}
library(unlayout)
library(plotly)
p1 <- plot_ly(economics, x = ~ pop, width = 350)
p2 <- plot_ly(economics, x = ~ date, y = ~ pop, height = 240, width = 600)
p3 <- plot_ly(z = ~ volcano)
unlayout(p1, p2, p3)
```![unlayout-gif](man/figures/unlayout.gif)
## Related works
Please check out [shinyjqui](https://github.com/Yang-Tang/shinyjqui) for rich interactable features, including draggable, resizable, and sortable.