Skip to content

Commit

Permalink
Fix bug in bubble chart example with unstable color coding
Browse files Browse the repository at this point in the history
  • Loading branch information
jcheng5 committed Sep 12, 2014
1 parent 648ece1 commit 23d6982
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions inst/examples/bubble/server.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@ shinyServer(function(input, output, session) {
yearData <- reactive({
# Filter to the desired year, and put the columns
# in the order that Google's Bubble Chart expects
# them (name, x, y, color, size)
# them (name, x, y, color, size). Also sort by region
# so that Google Charts colors the regions consistently
# (thanks Prof. Gelman).
df <- data %.%
filter(Year == input$year) %.%
select(Country, Health.Expenditure, Life.Expectancy,
Region, Population)
Region, Population) %.%
arrange(Region)
})

output$chart <- reactive({
Expand Down

0 comments on commit 23d6982

Please sign in to comment.