Skip to content

Commit

Permalink
update oecd app based on latest version of rCharts
Browse files Browse the repository at this point in the history
  • Loading branch information
ramnathv committed Apr 12, 2013
1 parent c6c24af commit 445553b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion index.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ p1 <- rPlot(x = list(var = "countrycode", sort = "value"), y = "value",
color = 'gender', data = women, type = 'bar')
# Step 3. add a second layer for men, displayed as points
p1$layer2(x = "countrycode", y = "value", color = 'gender',
p1$layer(x = "countrycode", y = "value", color = 'gender',
data = men, type = 'point', size = list(const = 3))
# Step 4. format the x and y axis labels
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ <h3>Bar Plot</h3>
color = &#39;gender&#39;, data = women, type = &#39;bar&#39;)

# Step 3. add a second layer for men, displayed as points
p1$layer2(x = &quot;countrycode&quot;, y = &quot;value&quot;, color = &#39;gender&#39;,
p1$layer(x = &quot;countrycode&quot;, y = &quot;value&quot;, color = &#39;gender&#39;,
data = men, type = &#39;point&#39;, size = list(const = 3))

# Step 4. format the x and y axis labels
Expand Down
2 changes: 1 addition & 1 deletion index.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ p1 <- rPlot(x = list(var = "countrycode", sort = "value"), y = "value",
color = 'gender', data = women, type = 'bar')

# Step 3. add a second layer for men, displayed as points
p1$layer2(x = "countrycode", y = "value", color = 'gender',
p1$layer(x = "countrycode", y = "value", color = 'gender',
data = men, type = 'point', size = list(const = 3))

# Step 4. format the x and y axis labels
Expand Down
8 changes: 4 additions & 4 deletions rChartOECD/server.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ shinyServer(function(input, output) {
men <- subset(dat2m, gender == "Men" & year == YEAR)
women <- subset(dat2m, gender == "Women" & year == YEAR)
p1 <- rPlot(x = list(var = "countrycode", sort = "value"), y = "value",
color = 'gender', data = women, type = 'bar')
p1$layer2(x = "countrycode", y = "value", color = 'gender',
data = men, type = 'point', size = list(const = 3))
color = 'gender', data = women, type = 'bar')
p1$layer(x = "countrycode", y = "value", color = 'gender',
data = men, type = 'point', size = list(const = 3))
p1$addParams(height = 300, dom = 'chart1',
title = "Percentage of Employed who are Senior Managers")
title = "Percentage of Employed who are Senior Managers")
p1$guides(x = list(title = "", ticks = unique(men$countrycode)))
p1$guides(y = list(title = "", max = 18))
return(p1)
Expand Down

0 comments on commit 445553b

Please sign in to comment.