Advertisement
Guest User

Untitled

a guest
Feb 7th, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1.  
  2. library(shiny)
  3. library(googleVis)
  4. shinyServer(function(input, output, session){
  5.  
  6.  
  7.  
  8.  
  9. output$bubble <- renderGvis({
  10.  
  11. gvisBubbleChart(Fruits, idvar="Fruit",
  12. xvar="Sales", yvar="Expenses",
  13. colorvar="Year", sizevar="Profit",
  14. options=list(title = "An example of Bubble Chart",
  15. hAxis='{title: "Sales", minValue:75, maxValue:125}',
  16. vAxis='{title: "Expenses"}'
  17. )
  18. ) })
  19.  
  20. output$scatter <- renderGvis({
  21.  
  22. gvisScatterChart(women,
  23. options=list(
  24. legend="none",
  25. lineWidth=0, pointSize=1,
  26. title="Example of Scatterplot using Women dataset", vAxis="{title:'weight (lbs)'}",
  27. hAxis="{title:'height (in)'}",
  28. width=300, height=300))
  29.  
  30.  
  31. })
  32.  
  33. output$guage <- renderGvis({
  34.  
  35. gvisGauge(CityPopularity,
  36. options=list(title= 'Example of Guage', min=0, max=800, greenFrom=500,
  37. greenTo=800, yellowFrom=300, yellowTo=500,
  38. redFrom=0, redTo=300, width=400, height=300))
  39.  
  40.  
  41. })
  42.  
  43.  
  44. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement