Skip to content

Commit

Permalink
use "href" attribute (SVG 2)
Browse files Browse the repository at this point in the history
  • Loading branch information
hjacobs committed Jan 26, 2021
1 parent 1ee3611 commit 338c63e
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions docs/radar.js
Original file line number Diff line number Diff line change
Expand Up @@ -306,12 +306,8 @@ function radar_visualization(config) {
.data(segmented[quadrant][ring])
.enter()
.append("a")
.attr("xlink:href", function (d, i) {
return d.url ? "#" : null; // it's better to open new window so we provide # as url to stay on same page
})
.on("click", function (d) {
// let's open new tab/window instead of redirecting off the radar
window.open(d.url, "_blank");
.attr("href", function (d, i) {
return d.link ? d.link : "#"; // stay on same page if no link was provided
})
.append("text")
.attr("transform", function(d, i) { return legend_transform(quadrant, ring, i); })
Expand Down

0 comments on commit 338c63e

Please sign in to comment.