diff --git a/assets/cn.js b/assets/cn.js index 389935df5f1469ec2f152f0adc6995a72302fde7..67de4704d609eed21b26237b35d21665872acc31 100644 --- a/assets/cn.js +++ b/assets/cn.js @@ -137,9 +137,15 @@ var g = svg.append("g") /** * loads JSON data and calls the update function */ -d3.json("json_text.json").then(function(graph) { +d3.json("json_text.json").then(success,failure) +function success(graph){ update(graph.links, graph.nodes); -}) + +} +function failure(graph){ + localStorage.setItem("oldjson","irgendwaswasimmergespeichertwirdwennkeinejsondaist") + +} var intervalId=window.setInterval(function(){ d3.json("json_text.json").then(function(graph) { @@ -313,9 +319,13 @@ function is_link_for_node(node, link) { * @param {object} node - node */ function textbox_content(node) { + authors = node.author[0] + for (i = 1; i < node.author.length; i++) { + authors += (", "+node.author[i]) + } text_info = "Title:" + '</br>' + node.name + - '</br>' +'</br>'+"Author:"+ '</br>' +node.author+'</br>'+'</br>'+"Date:"+'</br>' - +node.year+'</br>'+'</br>'+"Journal:"+'</br>'+node.journal+'</br>'+'</br>'+"doi:" + '</br>' +'</br>'+"Author:"+ '</br>' +authors+'</br>'+'</br>'+"Date:"+'</br>' + +node.year+'</br>'+'</br>'+"Journal:"+'</br>'+node.journal+'</br>'+'</br>'+"DOI:" +'</br>'+'<a href="'+node.doi+ '">'+node.doi+'</a>'+'</br>'+'</br>'+"Citations:" +'</br>'+node.citations; text_abstract = node.abstract; diff --git a/assets/cn2.js b/assets/cn2.js index dce918d24e11ba191318915544fd9c8179eb9414..c31823abcb405db0637a7e9d0edbed42cef534b3 100644 --- a/assets/cn2.js +++ b/assets/cn2.js @@ -54,8 +54,8 @@ var rect = svg.append("rect") var svg_legend = d3.select("svg.legendsvg"), legend_position = [65,95,125], arrow_legend_position = [0,25], -arrow_group_names = ["citation","self-citation"], -group_names = ["cited by","input","reference"], +arrow_group_names = ["Citation","Self-Citation"], +group_names = ["Cited By","Input","Reference"], line_type = d3.scaleOrdinal() .domain(["line","dotted"]) .range([("8,0"),("8,8")]), @@ -136,8 +136,8 @@ var g = svg.append("g") * creates xAxis element */ var xAxis = d3.axisBottom() - .tickFormat(function(d) {return d;}) - .ticks(10);; + .tickFormat(function(d) {if (d%1==0) return d;}) + .ticks(10); /** * draw xAxis @@ -146,18 +146,25 @@ var gX = svg.append("g") .attr("class", "axis axis--x") .attr("transform", "translate(0,25)") gX.append("text") - .attr("y", 0) - .attr("x", 80) + .attr("y", -5) + .attr("x", 85) .attr("text-anchor", "end") - .attr("stroke", "black") - .text("year"); + .style('fill', 'black') + .text("Year") + .style("font-size", "15px"); /** * loads JSON data and calls the update function */ -d3.json("json_text.json").then(function(graph) { +d3.json("json_text.json").then(success,failure) +function success(graph){ update(graph.links, graph.nodes); -}) + +} +function failure(graph){ + localStorage.setItem("oldjson","irgendwaswasimmergespeichertwirdwennkeinejsondaist") + +} var intervalId=window.setInterval(function(){ d3.json("json_text.json").then(function(graph) { @@ -285,6 +292,7 @@ function update_marker(color, target) { * @param {object} node - node */ function click_node(node) { + d3.select(this.parentNode).raise(); fix_nodes(node); if(to_remove){ @@ -344,15 +352,23 @@ function is_link_for_node(node, link) { return link.source.index == node.index || link.target.index == node.index; } + + /** * saves text for overview and abstract of node * outputs node info to textbox * @param {object} node - node */ + + function textbox_content(node) { + authors = node.author[0] + for (i = 1; i < node.author.length; i++) { + authors += (", "+node.author[i]) + } text_info = "Title:" + '</br>' + node.name + - '</br>' +'</br>'+"Author:"+ '</br>' +node.author+'</br>'+'</br>'+"Date:"+'</br>' - +node.year+'</br>'+'</br>'+"Journal:"+'</br>'+node.journal+'</br>'+'</br>'+"doi:" + '</br>' +'</br>'+"Author:"+ '</br>' +authors+'</br>'+'</br>'+"Date:"+'</br>' + +node.year+'</br>'+'</br>'+"Journal:"+'</br>'+node.journal+'</br>'+'</br>'+"DOI:" +'</br>'+'<a href="'+node.doi+ '">'+node.doi+'</a>'+'</br>'+'</br>'+"Citations:" +'</br>'+node.citations; text_abstract = node.abstract; diff --git a/assets/index.html b/assets/index.html index 374abe283271574e67bd8d73e3691ef35b9e782d..6be905718d537a01052b42052d4df9c58288eb68 100644 --- a/assets/index.html +++ b/assets/index.html @@ -84,9 +84,9 @@ </head> <body> - <button id="change_graph" class="display" onclick="display()">display timeline</button> + <button id="change_graph" class="display" onclick="display()">Display Timeline</button> - <!-- graph --> + <!-- graph 576--> <svg class="graph" width="960" height="560"></svg> <p id="oldjson"></p> @@ -115,18 +115,18 @@ <script type="text/javascript" > if(window.location.hash=='#default'){ - document.getElementById("change_graph").innerHTML = 'display timeline'; + document.getElementById("change_graph").innerHTML = 'Display Timeline'; load_default(); } else if(window.location.hash=='#time'){ - document.getElementById("change_graph").innerHTML = 'display default'; + document.getElementById("change_graph").innerHTML = 'Display Default'; load_time(); } else if(window.location.hash==''){ window.location.hash = 'default'; - document.getElementById("change_graph").innerHTML = 'display timeline'; + document.getElementById("change_graph").innerHTML = 'Display Timeline'; load_default(); } function display(){ diff --git a/assets/json_text.json b/assets/json_text.json index b2e4c5f1d417d21f23729da7e833989a82a9eeaf..a69c8ec414cf10124d4279536aa32d829bb13b5a 100644 --- a/assets/json_text.json +++ b/assets/json_text.json @@ -1 +1,114 @@ -{"nodes": [{"doi": "https://doi.org/10.1021/acs.jcim.6b00709", "name": "Matched Molecular Series: Measuring SAR Similarity", "author": ["Emanuel S. R. Ehmki", "Christian Kramer"], "year": "May 1, 2017", "journal": "Journal of Chemical Information and Modeling", "group": "Input", "depth": 0, "citations": 5}, {"doi": "https://doi.org/10.1021/acs.jcim.0c00269", "name": "Matched Molecular Series Analysis for ADME Property Prediction", "author": ["Mahendra Awale", "Sereina Riniker", "Christian Kramer"], "year": "May 5, 2020", "journal": "Journal of Chemical Information and Modeling", "group": "Citedby", "depth": 1, "citations": 6}, {"doi": "https://doi.org/10.1021/acs.jcim.0c00290", "name": "Identification of Bioisosteric Substituents by a Deep Neural Network", "author": ["Peter Ertl"], "year": "June 15, 2020", "journal": "Journal of Chemical Information and Modeling", "group": "Citedby", "depth": 2, "citations": 2}], "links": [{"source": "https://doi.org/10.1021/acs.jcim.0c00269", "target": "https://doi.org/10.1021/acs.jcim.6b00709"}, {"source": "https://doi.org/10.1021/acs.jcim.0c00290", "target": "https://doi.org/10.1021/acs.jcim.0c00269"}]} \ No newline at end of file +{ + "nodes": [ + { + "doi": "https://doi.org/10.1021/acs.jcim.5b00332", + "name": "Feasibility of Active Machine Learning for Multiclass Compound Classification", + "author": [ + "Tobias Löang", + "Florian Flachsenberg", + "Ulrike von Luxburg", + "Matthias Rarey" + ], + "year": "January 7, 2016", + "journal": "Journal of Chemical Information and Modeling", + "group": "Input", + "depth": 0, + "citations": 5 + }, + { + "doi": "https://doi.org/10.1021/acs.jcim.7b00729", + "name": "Modeling Kinase Inhibition Using Highly Confident Data Sets", + "author": [ + "Sorin Avram", + "Alina Bora", + "Liliana Halip", + "Ramona Curp\u0103n" + ], + "year": "April 30, 2018", + "journal": "Journal of Chemical Information and Modeling", + "group": "Citedby", + "depth": 1, + "citations": 0 + }, + { + "doi": "https://doi.org/10.1021/acs.jcim.7b00729", + "name": "Modeling Kinase Inhibition Using Highly Confident Data Sets", + "author": [ + "Sorin Avram", + "Alina Bora", + "Liliana Halip", + "Ramona Curp\u0103n" + ], + "year": "April 30, 2018", + "journal": "Journal of Chemical Information and Modeling", + "group": "Citedby", + "depth": 1, + "citations": 0 + }, + { + "doi": "https://doi.org/10.1021/acs.jcim.5b00646", + "name": "Predictive Models for Fast and Effective Profiling of Kinase Inhibitors", + "author": [ + "Alina Bora", + "Sorin Avram", + "Ionel Ciucanu", + "Marius Raica", + "Stefana Avram" + ], + "year": "April 11, 2016", + "journal": "Journal of Chemical Information and Modeling", + "group": "Citedby", + "depth": 1, + "citations": 2 + }, + { + "doi": "https://doi.org/10.1021/acs.jcim.6b00709", + "name": "Matched Molecular Series: Measuring SAR Similarity", + "author": [ + "Emanuel S. R. Ehmki", + "Christian Kramer" + ], + "year": "May 1, 2017", + "journal": "Journal of Chemical Information and Modeling", + "group": "Input", + "depth": 0, + "citations": 5 + }, + { + "doi": "https://doi.org/10.1021/acs.jcim.0c00269", + "name": "Matched Molecular Series Analysis for ADME Property Prediction", + "author": [ + "Mahendra Awale", + "Sereina Riniker", + "Christian Kramer" + ], + "year": "May 5, 2020", + "journal": "Journal of Chemical Information and Modeling", + "group": "Citedby", + "depth": 1, + "citations": 6 + } + ], + "links": [ + { + "source": "https://doi.org/10.1021/acs.jcim.7b00729", + "target": "https://doi.org/10.1021/acs.jcim.5b00332" + }, + { + "source": "https://doi.org/10.1021/acs.jcim.7b00729", + "target": "https://doi.org/10.1021/acs.jcim.5b00332" + }, + { + "source": "https://doi.org/10.1021/acs.jcim.5b00646", + "target": "https://doi.org/10.1021/acs.jcim.5b00332" + }, + { + "source": "https://doi.org/10.1021/acs.jcim.7b00729", + "target": "https://doi.org/10.1021/acs.jcim.5b00646" + }, + { + "source": "https://doi.org/10.1021/acs.jcim.0c00269", + "target": "https://doi.org/10.1021/acs.jcim.6b00709" + } + ] +} \ No newline at end of file