Created
June 7, 2017 23:30
-
-
Save tiagochst/fdca88074181b276165ba34d5c6ff397 to your computer and use it in GitHub Desktop.
Error in safari
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
# Contributed by Joe Cheng, February 2013 | |
# Requires googleVis version 0.4.0 and shiny 0.4.0 or higher | |
# server.R | |
library(googleVis) | |
library(shiny) | |
shinyServer(function(input, output) { | |
output$view <- renderGvis({ | |
Pie1 <- gvisPieChart(CityPopularity) | |
## Doughnut chart - a pie with a hole | |
Pie2 <- gvisPieChart(CityPopularity, options=list( | |
slices="{4: {offset: 0.2}, 0: {offset: 0.3}}", | |
title='City popularity', | |
legend='none', | |
pieSliceText='label', | |
pieHole=0.5)) | |
gvisMerge(Pie2, Pie1) | |
}) | |
output$view2 <- renderGvis({ | |
gvisPieChart(CityPopularity) | |
}) | |
output$view3 <- renderGvis({ | |
gvisPieChart(CityPopularity, options=list( | |
slices="{4: {offset: 0.2}, 0: {offset: 0.3}}", | |
title='City popularity', | |
legend='none', | |
pieSliceText='label', | |
pieHole=0.5)) | |
}) | |
}) |
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
shinyUI(fluidPage( | |
fluidRow( | |
mainPanel( | |
htmlOutput("view"), | |
htmlOutput("view2"), | |
htmlOutput("view3") | |
)) | |
)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment