From 279326a413edd5b793ce93cf9185ec23214dc468 Mon Sep 17 00:00:00 2001
From: Merle Stahl <merle.stahl@studium.uni-hamburg.de>
Date: Fri, 26 Nov 2021 19:37:11 +0100
Subject: [PATCH] doi anklickbar

---
 Output/cn.js | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/Output/cn.js b/Output/cn.js
index cc33116..d4ddeb2 100644
--- a/Output/cn.js
+++ b/Output/cn.js
@@ -65,8 +65,7 @@ var g = svg.append("g")
 * creates XAxis element
 */
 var xAxis = d3.axisBottom()
-    .tickFormat(function(d) {return d;})
-    .ticks(10);
+    .tickFormat(function(d) {return d;});
 
 /**
 * draw xAxis
@@ -123,7 +122,7 @@ function updateXAxis(nodes) {
 
     xscale = d3.scaleLinear()
         .domain([d3.min(years), d3.max(years)])
-        .range([50, width-50])
+        .range([0, width])
 
     xAxis.scale(xscale);
     gX.call(xAxis);
@@ -268,8 +267,8 @@ function firstauthor(authors){
 function textfunc(node){
     document.getElementById('textbox').innerHTML = "Title:" + '</br>' + node.name +
     '</br>' +'</br>'+"Author:"+ '</br>' +node.author+'</br>'+'</br>'+"Year:"+'</br>'
-    +node.year+'</br>'+'</br>'+"doi:"+'</br>'+node.doi+'</br>'+'</br>'+"Citations:"
-    +'</br>'+node.citations;
+    +node.year+'</br>'+'</br>'+"doi:"+'</br>'+'<a href="'+node.doi+ '">'+node.doi
+    +'</a>'+'</br>'+'</br>'+"Citations:"+'</br>'+node.citations;
 }
 
 /**
-- 
GitLab