Created
November 10, 2015 23:52
-
-
Save simecek/bc27b3365fcb6bc77959 to your computer and use it in GitHub Desktop.
Minimal example for iplot axis and title overplotting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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