Skip to content
Snippets Groups Projects

group Namen

Merged Stahl, Merle requested to merge bax9187/projekt-cis-biochemie-2021-22:main into main
4 files
+ 10
36
Compare changes
  • Side-by-side
  • Inline
Files
4
+ 2
9
/**
* Zeilen kürzen
* creates a new zoom behavior
*/
var zoom = d3.zoom().on("zoom", handle_zoom);
@@ -16,13 +15,12 @@ perc;
/**
* scale functions that return y coordinate/color of node depending on group
* genauer Erläutern!
*/
var color = d3.scaleOrdinal()
.domain(["height", "input", "depth"])
.domain(["Citedby", "Input", "Reference"])
.range([' #01d7c0', ' #8b90fe ', ' #a15eb2 ']),
y_scale = d3.scaleOrdinal()
.domain(["height", "input", "depth"])
.domain(["Citedby", "Input", "Reference"])
.range([0, 200, 400]),
to_remove;
@@ -51,7 +49,6 @@ var rect = svg.append("rect")
/**
* creates svg object (legend) and associated attributes
* transform
* mehr kommentare
*/
var svg_legend = d3.select("svg.legendsvg"),
legend_position = [65,95,125],
@@ -112,7 +109,6 @@ legend_arrow.append("text")
* creates a new simulation
* updates the positions of the links and nodes when the
state of the layout has changed (simulation has advanced by a tick)
tertärer Operator
*/
var simulation = d3.forceSimulation()
.force("link", d3.forceLink().id(function(d) {return d.doi;}).distance(50).strength(function(d) {
@@ -140,7 +136,6 @@ var g = svg.append("g")
/**
* loads JSON data and calls the update function
Variable
*/
d3.json("json_text.json").then(function(graph) {
update(graph.links, graph.nodes);
@@ -268,7 +263,6 @@ function click_node(node) {
/**
* removes the highlights of the circles and their links
to_remove auch hier benutzen
*/
function click_rect() {
fix_nodes(node);
@@ -419,7 +413,6 @@ function handle_zoom() {
/**
* transforms svg so that the zoom is adapted to the size of the graph
zoom_start initial
*/
function zoom_to() {
node_bounds = d3.selectAll("svg.graph").node().getBBox();
Loading