shinyWidgets | shinyWidgets : Extend widgets available in shiny | Data Visualization library
kandi X-RAY | shinyWidgets Summary
kandi X-RAY | shinyWidgets Summary
This package offers custom widgets and other components to enhance your shiny applications. You can replace classical checkboxes with switch button, add colors to radio buttons and checkbox group, use buttons as radio or checkboxes. Each widget has an update method to change the value of an input from the server. A live version is available here :
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of shinyWidgets
shinyWidgets Key Features
shinyWidgets Examples and Code Snippets
Community Discussions
Trending Discussions on shinyWidgets
QUESTION
ANSWER
Answered 2022-Mar-12 at 09:55I did a modification of the prettyRadioButtons
function. But this is only specific to your case (3 / 3-3).
QUESTION
In the below reproducible code, two main conditional panels are presented: "Stratification" and "DnL balances". The first presents a smaller data table where no scroll bars are automatically introduced, and the 2nd presents a larger data table where scroll bars are introduced.
The scroll bars in one conditional panel appear to be affecting the other conditional panel. I have tried addressing with style = "display: none;"
(based on a related post yesterday), flagged with ### in this reproducible code, but it leaves the 2nd conditional panel without the glide/well panel across the top unless the user adjusts the size of the window, however minutely. Yesterday's posted solution worked fine, but that code didn't render a data table. When introducing a data table and resulting scroll bars, the issue manifests.
Is there a way to resolve this? May be a hack, but even a tiny automated adjustment to the size of the window may help?
The images at the bottom better explain the issue.
...ANSWER
Answered 2022-Mar-07 at 10:42Edit: The dev-version is already fixed:
remotes::install_github("juba/shinyglide")
should resolve the issue.
Initial answer:
Regarding shinyglide's behaviour I filed an issue here.
Using library(DT)
you could avoid the long output which leads to the vertical scrollbar:
QUESTION
I'm having trouble with the formats of conditional panels affecting other conditional panels. Below is reproducible code, and at the bottom are images better explaining the issue. In the fuller App this code derives from, the problem is more obvious and makes it look sloppy (in the fuller App, there are multiple screens the user clicks through as the user scrolls to the right along the shaded bar (Well Panel) at the top just underneath the tab label, and the misalignment gets more pronounced as the user scrolls to the right).
The problem is: as the user scrolls right through the Glide Controls / Well Panels to make selections, the Well Panels (at the top with radio buttons) begin to misalign with the table and/or plots that appear beneath. The misalignment gets more pronounced as the user scrolls right. This misalignment isn't as apparent in this reproducible example, but is more pronounced in the fuller App this derives from where there are multiple "screens" or Well Panels at the top for the user to scroll through and where there are data tables and/or plots presented underneath in the main panel.
For sake of simplicity all server code is eliminated in this example (no plots, no tables), as the issue still presents without the server code.
If I comment-out other conditional panels (marked "###" in the reproducible code) the misalignment goes away. So how can I make the conditional panels independent of one another, as a way of eliminating this misalignment? I'm open to any other suggestions for eliminating this misalignment.
The basic structure of the App is the user makes "big choices" along the sidebar panel, and makes more "refined choices" only the top bar underneath the tab label using Glide Controls/Well Panels etc. for a carousel affect.
Reproducible code:
...ANSWER
Answered 2022-Mar-03 at 10:49Actually this is the same issue as here.
The conditionalPanel
s are visible for a very short time when first invoking the app.
This causes a vertical scrollbar to appear and leads to the misalignment.
Use style = "display: none;"
to render the conditionalPanel
s hidden on startup (where needed) and please leave a thumbs up or other feedback here.
QUESTION
I have a shiny app where I want two different buttons to open the same Sweet Alert, I was doing this using observeEvent with req(input$1 | input$2). This worked until I moved the two buttons to their own individual sweetAlerts, now the observeEvent only works if both buttons pop up in the sweetAlert. See repex below:
Note: the goal of the reprex is to press either Alert 1 or Alert 2, then the button that pops up in the resulting sweetAlert to get a success.
...ANSWER
Answered 2022-Feb-25 at 00:11Try this
QUESTION
I'm trying to toggle the control bar using an actionLink in the top right (to basically copy what the gears icon is doing, and later I will remove the gears icon to just have one actionLink) and also to automate the toggling such that when the user clicks on feedback, the controlbar disappears and reappears when the user clicks on any other tab. I also want to make sure throughout this toggling, the controlbar does not overlay on the dashboard body (basically the dashboard body will resize appropriately whenever the control bar toggles).
This is what I've tried so far:
...ANSWER
Answered 2022-Feb-14 at 08:16There is no need to create a new actionLink
and hide the existing a-tag. We can simply modify it.
Please check the following:
QUESTION
I am trying to create two dropdowns based on user input. If a user selects "val1", then show values in the second dropdown from "x". If "val2", then "y". If both "val1" and "val2", then z.
So far, I succeeded except for the multiple selection part. I also tried:
else if (input$lab == "val1" & input$lab == "val2")
which gives me the same error:
the condition has length > 1 and only the first element will be used
ANSWER
Answered 2022-Feb-11 at 17:36Slight change in approach in your server. Rather than ifelse to test for for x, y, or x&y, you can instead test for length == 1 and then within that case, whether it's x or y.
QUESTION
I want to create an application where inputs are matched with a score. Here is my code:
...ANSWER
Answered 2022-Jan-25 at 22:40Try this short and tidy server expression:
QUESTION
I am trying to generate a shiny app that will first allow the user to (using the notion of dplyr verbs) select the variables they are interested in and then filter those variables based on subsequent selections. I am trying to do this using conditionalPanel()
but I am getting stuck finding a way to access the input$
from each conditional panel.
Here is an example:
...ANSWER
Answered 2022-Jan-25 at 20:48We may use across
(if we want to filter
the rows when both column conditions are TRUE) or replace across
with if_any
(if either one of them is TRUE when they are both selected)
QUESTION
I have attempted to make a reproducible example below, although keep in mind that in my app there are many more dependencies.
Basically, I made inputs corresponding to what is in a dataTable. The placeholder for each input is taken directly from the data.
I used lapply() to generate observeEvents for each input boxes, and made it so that if the user changes the value in the inputs, it is sent to the dataset and reflected in the table. This works great and is quite fast!
My problem however, is that if I take my time to write a Petal.Length of 5.33, as soon as I type the number '5', the observeEvent is triggered. If I am quick on the keyboard I can write the number before the event is triggered, but if I take just a 0.1 second too long the event is triggered.
Is there a way for the observeEvent to be triggered only once I have clicked out of the input box? I don't really want to add a 'submit' button at the end of the row, for instance.
Please see my code below:
...ANSWER
Answered 2022-Jan-25 at 13:20Here is an example on how to use debounce
.
Furthermore I simpified your code (please never nest observers):
QUESTION
I'm trying to allow the user to add successive UI output seen in server_module2 from another module (ui_module1). So, when they hit the button, they will see 3 UI objects: textOutput, sliderInput, textInput. My code below stops at outputting the UI object. If I don't wrap it in the 1st module, it works fine.
Thank you.
...ANSWER
Answered 2022-Jan-20 at 22:37Here is the working code. A lot you need to notice. Here are some key points.
- Remember to add
ns
for all modules. renderUI
only returns one object, if you want to return more than one components, usetagList
ordiv
.insertUI
selector inside module also needs to addns
.
Check the code yourself for minor bugs.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install shinyWidgets
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page