I have created a dynamic Highchart in R Shiny App. I want to display a customized message when there is no data to display the charts.
In Highchart API, there is setOptions where you can display the customized message. Something similar is mentioned in this question: How to display No Data Available Message in highcharts.
But I haven't found anything similar in Highcharter.
Any solutions?
Within your renderHighcharter function, you can put something like this:
shiny::validate(
need((nrow(DataSet()) != 0), "No data available based on your selection")
)
You can have as many validate functions that you need and make them as complicated as you need to help the user troubleshoot.
Related
I'm writing a ShinyApp which presents Seurat data. I want the app users to be able to select specific cell for later comparison and analysis. I want the cellSelcetor to be activated when a button is pressed, so I tried:
observeEvent(input$selectCells, {
output$clusterCompPlot <- renderPlot({CellSelector(plot = chosenClusterPlot)})
})
The problem is, I think, that cellSelector is already based on shiny, so I'm currently getting the following error:
Error in shiny::runApp: Can't call runApp() from within runApp(). If your application code contains runApp(), please remove it.
Is there any way to integrate this feature into my app?
Thanks!
My problem is that the validation is not working well in interactive grid in my application. I have tried all the possible ways, but nothing is working. The validation works well in the interactive report, but not with the interactive grid.
The problem is that the error message keeps appear even if the data is correct. EX: if the validation condition is "Column is not null", the error message is shown even if I fill the column with data.
..
Another thing, if I made the option of value required on, the same problem appears.
Is their anything to do?
I'm curious about how the validation worked for Interactive Report, anyway here's an example about how to create page validations:
In your Interactive Grid Page, navigate to validations and make sure that editable region and column are set up correctly.
When you run the page, you'll be able to see the error message when column is null. Once the column has a value, it will possible to save the changes.
I'm doing what the solution states, however, the error notification message "1 Error has ocurred" followed by the validation error message doesn't show up, I just get a red frame with an X icon on the field, and when saving, it just shows a notification message "Correct errors before saving". For the validations, The editable region and column are set up correctly, just like on the example image.
I am looking for some assistance regarding using a dateInput in a CRUD app. I used the source code from the iPub blog post about CRUD Shiny Apps : https://ipub.com/shiny-crud-app/
I've been trying to modify the code so that there is a dateInput. I was able to get the format to be a date (different source code than below) but it will only show the current date even when you change the input. The solve on that code does not work on the sample code below and this will also demo that the date will not change.
I'm getting only characters instead of a date format and it is the same characters/dates regardless of what is selected via the input.
https://gist.github.com/john-magrini/c9a6a5cf11653b40edc77cffbe632f8b
Thanks in advance!
Let's take a look at one of the demos.
runExample("09_upload")
I am using the supplied file to perform some computations and to display an aggregated performance across all uploaded files. Therefore, I use something like
tryCatch(compute.smth(), error=function(e){})
so that the displayed result is not affected by the bad input. However, I'd like to indicate somehow that uploading the bad file lead to an error, notifying the user about the problem with his input. It'll be something like
tryCatch(compute.smth(), error=badFile())
where badFile() should modify some displayable output. Any ideas?
As a last resort, this is probably an option, but I'd like some native Shiny.
You can show alerts like below with the ShinySky package: https://github.com/AnalytixWare/ShinySky
You can install the package using
install.packages("devtools")#if not alrady installed
devtools::install_github("ShinySky","AnalytixWare")
Place a shinyalert(id) in the ui.R for where you want the alert to appear.
In your server.R
Make sure you have a 3 parameters funciton being passed to shinyServer e.g.shinyServer(function(input, output,session) {
use showshinyalert(id,HTMLText,session) to show the alert. Clicking on the alert will dismiss it.
See this gist for example https://gist.github.com/xiaodaigh/7707701
Run this too see an example
shinysky::run.shinysky.example()
I am trying to create a graph out of a data control that I have created. The graph named myNewGraph is not showing up when I run my website, but when I preview the graph itself it is perfect.
JDeveloper autogenerates the graph, it generates this code, notice the value:
<dvt:comboGraph id="comboGraph2" shortDesc="PriceMetrics"
value="#{bindings.myNewGraph.graphModel}"
subType="COMBINATION_VERT_ABS_2Y" customLayout="CL_NONE>
I have another graph I have created that has a similar code make-up. This one works perfectly.
<dvt:comboGraph id="comboGraph1" shortDesc="PriceMetrics"
value="#{bindings.existingGraph.graphModel}"
subType="COMBINATION_VERT_ABS" customLayout="CL_NONE"
I believe it has something to do with the value, that is causing my myNewGraph to not work. Because when I replace it with the value of existingGraph, the graph displays, but it doesn't display the correct data, since it has the same value.
How do I generate the value in bindings.myNewGraph.graphModel because I believe that it doesn't technically exist.
Are you sure the preview in the editor showed the real graph data ? from the description you give it sounds as if your data isn't queried. I suggest you debug the business service you expose in the data control to see if there is a query executed. From your description it doesn't look like a problem with the binding EL or the graph
Frank
You must import the graph bindings into the webpagePageDef.xml.