Permalink
Browse files

clicky

  • Loading branch information...
tlevine committed Aug 18, 2013
1 parent 3958608 commit 8fd7106c62a59f5236737c602fa8127cfbe0b1f4
Showing with 13 additions and 1 deletion.
  1. +1 −1 client/impacts.json
  2. +12 −0 client/js/views/dashboard/page.js
View

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -55,6 +55,18 @@ function createMap(){
.enter().append("path")
.attr("d", d3.geo.path().projection(xy))
.attr("fill", colorPicker)
+ .on('click', function(parish,i) {
+ d3.select('#barplot').selectAll('a.bar')
+ .style('display', 'none')
+
+ var count = permitApplications.filter(function(a){
+ return a.parish === parish.properties.COUNTY
+ }).length
+ var width = (100 / count) + '%'
+ d3.select('#barplot').selectAll('a.bar[data-parish="' + parish.properties.COUNTY + '"]')
+ .style('display', 'inline-block')
+ .style('width', width)
+ })
});

0 comments on commit 8fd7106

Please sign in to comment.