Skip to content
Snippets Groups Projects
Commit f1abcf08 authored by Katja's avatar Katja
Browse files

trying to merge

parent 9b8952f5
Branches
No related tags found
1 merge request!20Main
...@@ -137,9 +137,15 @@ var g = svg.append("g") ...@@ -137,9 +137,15 @@ var g = svg.append("g")
/** /**
* loads JSON data and calls the update function * 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); update(graph.links, graph.nodes);
})
}
function failure(graph){
localStorage.setItem("oldjson","irgendwaswasimmergespeichertwirdwennkeinejsondaist")
}
var intervalId=window.setInterval(function(){ var intervalId=window.setInterval(function(){
d3.json("json_text.json").then(function(graph) { d3.json("json_text.json").then(function(graph) {
...@@ -313,9 +319,13 @@ function is_link_for_node(node, link) { ...@@ -313,9 +319,13 @@ function is_link_for_node(node, link) {
* @param {object} node - node * @param {object} node - node
*/ */
function textbox_content(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 + text_info = "Title:" + '</br>' + node.name +
'</br>' +'</br>'+"Author:"+ '</br>' +node.author+'</br>'+'</br>'+"Date:"+'</br>' '</br>' +'</br>'+"Author:"+ '</br>' +authors+'</br>'+'</br>'+"Date:"+'</br>'
+node.year+'</br>'+'</br>'+"Journal:"+'</br>'+node.journal+'</br>'+'</br>'+"doi:" +node.year+'</br>'+'</br>'+"Journal:"+'</br>'+node.journal+'</br>'+'</br>'+"DOI:"
+'</br>'+'<a href="'+node.doi+ '">'+node.doi+'</a>'+'</br>'+'</br>'+"Citations:" +'</br>'+'<a href="'+node.doi+ '">'+node.doi+'</a>'+'</br>'+'</br>'+"Citations:"
+'</br>'+node.citations; +'</br>'+node.citations;
text_abstract = node.abstract; text_abstract = node.abstract;
......
...@@ -54,8 +54,8 @@ var rect = svg.append("rect") ...@@ -54,8 +54,8 @@ var rect = svg.append("rect")
var svg_legend = d3.select("svg.legendsvg"), var svg_legend = d3.select("svg.legendsvg"),
legend_position = [65,95,125], legend_position = [65,95,125],
arrow_legend_position = [0,25], arrow_legend_position = [0,25],
arrow_group_names = ["citation","self-citation"], arrow_group_names = ["Citation","Self-Citation"],
group_names = ["cited by","input","reference"], group_names = ["Cited By","Input","Reference"],
line_type = d3.scaleOrdinal() line_type = d3.scaleOrdinal()
.domain(["line","dotted"]) .domain(["line","dotted"])
.range([("8,0"),("8,8")]), .range([("8,0"),("8,8")]),
...@@ -136,8 +136,8 @@ var g = svg.append("g") ...@@ -136,8 +136,8 @@ var g = svg.append("g")
* creates xAxis element * creates xAxis element
*/ */
var xAxis = d3.axisBottom() var xAxis = d3.axisBottom()
.tickFormat(function(d) {return d;}) .tickFormat(function(d) {if (d%1==0) return d;})
.ticks(10);; .ticks(10);
/** /**
* draw xAxis * draw xAxis
...@@ -146,18 +146,25 @@ var gX = svg.append("g") ...@@ -146,18 +146,25 @@ var gX = svg.append("g")
.attr("class", "axis axis--x") .attr("class", "axis axis--x")
.attr("transform", "translate(0,25)") .attr("transform", "translate(0,25)")
gX.append("text") gX.append("text")
.attr("y", 0) .attr("y", -5)
.attr("x", 80) .attr("x", 85)
.attr("text-anchor", "end") .attr("text-anchor", "end")
.attr("stroke", "black") .style('fill', 'black')
.text("year"); .text("Year")
.style("font-size", "15px");
/** /**
* loads JSON data and calls the update function * 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); update(graph.links, graph.nodes);
})
}
function failure(graph){
localStorage.setItem("oldjson","irgendwaswasimmergespeichertwirdwennkeinejsondaist")
}
var intervalId=window.setInterval(function(){ var intervalId=window.setInterval(function(){
d3.json("json_text.json").then(function(graph) { d3.json("json_text.json").then(function(graph) {
...@@ -285,6 +292,7 @@ function update_marker(color, target) { ...@@ -285,6 +292,7 @@ function update_marker(color, target) {
* @param {object} node - node * @param {object} node - node
*/ */
function click_node(node) { function click_node(node) {
d3.select(this.parentNode).raise(); d3.select(this.parentNode).raise();
fix_nodes(node); fix_nodes(node);
if(to_remove){ if(to_remove){
...@@ -344,15 +352,23 @@ function is_link_for_node(node, link) { ...@@ -344,15 +352,23 @@ function is_link_for_node(node, link) {
return link.source.index == node.index || link.target.index == node.index; return link.source.index == node.index || link.target.index == node.index;
} }
/** /**
* saves text for overview and abstract of node * saves text for overview and abstract of node
* outputs node info to textbox * outputs node info to textbox
* @param {object} node - node * @param {object} node - node
*/ */
function textbox_content(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 + text_info = "Title:" + '</br>' + node.name +
'</br>' +'</br>'+"Author:"+ '</br>' +node.author+'</br>'+'</br>'+"Date:"+'</br>' '</br>' +'</br>'+"Author:"+ '</br>' +authors+'</br>'+'</br>'+"Date:"+'</br>'
+node.year+'</br>'+'</br>'+"Journal:"+'</br>'+node.journal+'</br>'+'</br>'+"doi:" +node.year+'</br>'+'</br>'+"Journal:"+'</br>'+node.journal+'</br>'+'</br>'+"DOI:"
+'</br>'+'<a href="'+node.doi+ '">'+node.doi+'</a>'+'</br>'+'</br>'+"Citations:" +'</br>'+'<a href="'+node.doi+ '">'+node.doi+'</a>'+'</br>'+'</br>'+"Citations:"
+'</br>'+node.citations; +'</br>'+node.citations;
text_abstract = node.abstract; text_abstract = node.abstract;
......
...@@ -84,9 +84,9 @@ ...@@ -84,9 +84,9 @@
</head> </head>
<body> <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> <svg class="graph" width="960" height="560"></svg>
<p id="oldjson"></p> <p id="oldjson"></p>
...@@ -115,18 +115,18 @@ ...@@ -115,18 +115,18 @@
<script type="text/javascript" > <script type="text/javascript" >
if(window.location.hash=='#default'){ if(window.location.hash=='#default'){
document.getElementById("change_graph").innerHTML = 'display timeline'; document.getElementById("change_graph").innerHTML = 'Display Timeline';
load_default(); load_default();
} }
else if(window.location.hash=='#time'){ else if(window.location.hash=='#time'){
document.getElementById("change_graph").innerHTML = 'display default'; document.getElementById("change_graph").innerHTML = 'Display Default';
load_time(); load_time();
} }
else if(window.location.hash==''){ else if(window.location.hash==''){
window.location.hash = 'default'; window.location.hash = 'default';
document.getElementById("change_graph").innerHTML = 'display timeline'; document.getElementById("change_graph").innerHTML = 'Display Timeline';
load_default(); load_default();
} }
function display(){ function display(){
......
{"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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment