derekovecs: som: fix mouseover titles
diff --git a/js/som.js b/js/som.js
index 1931f4f..c33950c 100644
--- a/js/som.js
+++ b/js/som.js
@@ -194,11 +194,14 @@
.data(data.words)
.enter().append("g")
.attr("class", "u");
- g.append("a")
+
+ g.append("svg:title")
+ .text(function(d, i) {
+ return "distance rank: "+ i +" "+"\nfrequency rank: "+data.ranks[i].toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
+ });
+
+ g.append("a")
.attr("xlink:href", function(word) {return "?"+urlprefix+word;})
- .attr("title", function(d, i) {
- return "rank: "+i +" "+"freq. rank: "+data.ranks[i].toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
- })
.append("text")
.attr("text-anchor", "bottom")
.attr("font-size", 12)