Skip to content

Commit

Permalink
Fixes issue w3c#115
Browse files Browse the repository at this point in the history
  • Loading branch information
almossawi committed Aug 12, 2014
1 parent 1e337b1 commit e34213d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
15 changes: 12 additions & 3 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,13 @@ $(document).ready(function() {
height: trunk.height,
right: trunk.right,
target: '#histogram1',
y_extended_ticks: true
y_extended_ticks: true,
rollover_callback: function(d, i) {
$('#histogram1 svg .active_datapoint')
.html('Frequency Count: ' + d.y);
}
})


var second = d3.range(1000).map(d3.random.bates(10));
second = d3.layout.histogram()(second)
Expand All @@ -63,7 +68,11 @@ $(document).ready(function() {
target: '#histogram2',
y_extended_ticks: true,
x_accessor:'value',
y_accessor:'count'
y_accessor:'count',
rollover_callback: function(d, i) {
$('#histogra2 svg .active_datapoint')
.html('Frequency Count: ' + d.y);
}
})

var third = d3.range(1000).map(d3.random.bates(10));
Expand All @@ -80,7 +89,7 @@ $(document).ready(function() {
right: trunk.right,
target: '#histogram3',
y_extended_ticks: true,
x_accessor:'val1',
x_accessor:'val1'
})

d3.json('data/fake_users1.json', function(data) {
Expand Down
2 changes: 1 addition & 1 deletion js/metrics-graphics.js
Original file line number Diff line number Diff line change
Expand Up @@ -1258,7 +1258,7 @@ charts.histogram = function(args) {
}

//highlight active bar
$('.histogram .bar :eq(' + i + ')')
$(args.target + ' svg .bar :eq(' + i + ')')
.css('opacity', 0.8);

//update rollover text
Expand Down

0 comments on commit e34213d

Please sign in to comment.