Skip to content

Commit 338c63e

Browse files
committed
use "href" attribute (SVG 2)
1 parent 1ee3611 commit 338c63e

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

docs/radar.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -306,12 +306,8 @@ function radar_visualization(config) {
306306
.data(segmented[quadrant][ring])
307307
.enter()
308308
.append("a")
309-
.attr("xlink:href", function (d, i) {
310-
return d.url ? "#" : null; // it's better to open new window so we provide # as url to stay on same page
311-
})
312-
.on("click", function (d) {
313-
// let's open new tab/window instead of redirecting off the radar
314-
window.open(d.url, "_blank");
309+
.attr("href", function (d, i) {
310+
return d.link ? d.link : "#"; // stay on same page if no link was provided
315311
})
316312
.append("text")
317313
.attr("transform", function(d, i) { return legend_transform(quadrant, ring, i); })

0 commit comments

Comments
 (0)