Skip to content

Commit

Permalink
Merge pull request #250 from tbender85/tbender85-issue-249
Browse files Browse the repository at this point in the history
Add data-info attribute to arcs
  • Loading branch information
markmarkoh committed Dec 15, 2015
2 parents 248fc2d + 856ca04 commit 3626d1d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/js/datamaps.js
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,9 @@
var sharpness = val(datum.arcSharpness, options.arcSharpness, datum);
return "M" + originXY[0] + ',' + originXY[1] + "S" + (midXY[0] + (50 * sharpness)) + "," + (midXY[1] - (75 * sharpness)) + "," + destXY[0] + "," + destXY[1];
})
.attr('data-info', function(datum) {
return JSON.stringify(datum);
})
.transition()
.delay(100)
.style('fill', function(datum) {
Expand Down Expand Up @@ -479,8 +482,8 @@
// if animation enabled start with radius 0, otherwise use full size.
return options.animate ? 0 : val(datum.radius, options.radius, datum);
})
.attr('data-info', function(d) {
return JSON.stringify(d);
.attr('data-info', function(datum) {
return JSON.stringify(datum);
})
.attr('filter', function (datum) {
var filterKey = filterData[ val(datum.filterKey, options.filterKey, datum) ];
Expand Down

0 comments on commit 3626d1d

Please sign in to comment.