Skip to content

Instantly share code, notes, and snippets.

@simecek
Created November 10, 2015 23:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simecek/bc27b3365fcb6bc77959 to your computer and use it in GitHub Desktop.
Save simecek/bc27b3365fcb6bc77959 to your computer and use it in GitHub Desktop.
Minimal example for iplot axis and title overplotting
library(shiny)
library(qtlcharts)
server <- function(input, output) {
output$interactivePlot <- iplot_render({
x <- rnorm(26) * ifelse(input$graphType == "higher values", 10, 1)
y <- rnorm(26) * ifelse(input$graphType == "higher values", 10, 1)
p1 <- iplot(x=x, y=y, indID = LETTERS,
chartOpts = list(title = input$graphType))
return(p1)
})
}
ui <- fluidPage(
sidebarLayout(
sidebarPanel(
radioButtons("graphType", "Select numbers:",
c("lower values", "higher values"), "lower values")
),
mainPanel(iplot_output("interactivePlot", height=450))
)
)
shinyApp(ui = ui, server = server)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment