What's the best way to plot graph using AcctionButton?

Hi people!

I have the following list of Gadgets in my UI.R code:

numericInput(inputId= "diametro", label= "Diametro do Aco:", value= 0),
                               
numericInput(inputId= "parede", label= "Parede:", value= 0),
                               
textInput(inputId= "grau", label= "Grau:", value= 0),
                               
textInput(inputId= "aqa", label= "AQA:", value= 0),
                                                                                             
actionButton("plot", "Plotar!") <-------- HERE THE BUTTON TO PASS THIS VALUES

... continue the code ...

box( title = "Relatorio de Capabilidade - Diametro x Parede - AQA - Grau",
                              width = "8",
                              footer = "Aqui pode vir qualquer texto",
                              plotOutput("histograma") <------------- HERE THE PLOT
                         )

And to plot this, I have the server.R code:

 output$histograma <-renderPlot({
    capabilidade_LE = qcc(data = capabilidade_LE, type="xbar", plot = TRUE)
    process.capability(object = capabilidade_LE, spec.limits = c(input$lininf,input$linsup))
  })

# Treatment of DATA
valor_le = df$LE
  
  valor_tr = df$TR
  
  relacao_ts = (valor_le/valor_tr)
  #------------------------------------Calculo pra Capabilidade---------------------
  capabilidade_LE <- valor_le
  capabilidade_LE = matrix(valor_le, nrow = 1, ncol = length(valor_le), byrow = TRUE)
  normalidade_LE = matrix(valor_le, nrow = length(valor_le), ncol = 1, byrow = TRUE)

I need to pass all this values to treat the data and plot the graph AFTER this treatment.

How can I do it using the ActionButton?

Many thanks!

We don't have enough information to help you, becuse we dont know what libraries are you using and we can't see what your data looks like. Could you please follow this guide about making reproducible examples with shiny apps?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.