Comments (3)
Hi, have you had a chance to take a look at this issue? Thanks!
from manipulatewidget.
Hi,
You can have the result you want using an observe
:
server <- function(input, output, session) {
data <- reactive({
if(runif(1) > 0.5){
data.frame(
year = 2000+1:input$obs,
series1 = rnorm(input$obs),
series2 = rnorm(input$obs),
series3 = rnorm(input$obs)
)
} else {
data.frame(
year = 2000+1:input$obs,
series1 = rnorm(input$obs),
series2 = rnorm(input$obs)
)
}
})
observe({
ncharts = input$ncharts
nrow = input$nrow
ncol = input$ncol
c <- manipulateWidget(
{
dygraph(data[range[1]:range[2] - 2000, c("year", series)], main = title)
},
range = mwSlider(min = 2001, max = 2001 + (nrow(data)-1), c(2001, 2001 + (nrow(data)-1))),
series = mwSelect(choices = colnames(data)[-1], value = colnames(data)[3]),
title = mwSharedValue(),
data = mwSharedValue(), .runApp = FALSE,
.compare = "range",
.compareOpts = compareOptions(ncharts = ncharts, nrow = nrow, ncol = ncol)
)
mwModule("ui", c, title = reactive(input$title), data = data)
})
}
from manipulatewidget.
Thanks for the response @bthieurmel. Your solution worked. I have another question though. I have multiple graphs, some from different packages and would like the option to chose which goes to which panel. I tried adding them below the dygraph(data[range[1]:range[2] - 2000, c("year", series)], main = title)
line but it didn't work. Could you please advice on an alternative solution. Thanks again for taking the time to respond.
from manipulatewidget.
Related Issues (20)
- Add the possibility to modify the output of manipulateWidget HOT 1
- Compare group of inputs
- return a shiny module instead of running a shiny gadget
- Sharding input
- Bad interaction with `crosstalk` HOT 1
- Manipulating combineWidgets objects HOT 3
- combineWidgets loses class of widgets HOT 1
- combineWidgets from formattable and plotly HOT 2
- Return a rendered leaflet map from leafletProxy() HOT 3
- Error in dyn.load(file, DLLpath = DLLpath, ...)
- Combine HTML Widgets with DataTables HOT 2
- Issue controlling argument in mwSelectize function via other input HOT 2
- Deploy manipulateWidget using R Plumber
- Pourquoi passer en valeur d'un input une expression ? HOT 5
- Not working for {gt} tables HOT 1
- Specify individual widget height - combineWidgets
- Input to asJSON warning message when using `combineWidgets`
- Example code does not work
- Possible te make combineWidgets mobile friendly?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from manipulatewidget.