Skip to content
Snippets Groups Projects
Commit 9b8952f5 authored by Stahl, Merle's avatar Stahl, Merle
Browse files

group Namen

parent d2468912
Branches
No related tags found
1 merge request!18group Namen
/** /**
* Zeilen kürzen
* creates a new zoom behavior * creates a new zoom behavior
*/ */
var zoom = d3.zoom().on("zoom", handle_zoom); var zoom = d3.zoom().on("zoom", handle_zoom);
...@@ -16,13 +15,12 @@ perc; ...@@ -16,13 +15,12 @@ perc;
/** /**
* scale functions that return y coordinate/color of node depending on group * scale functions that return y coordinate/color of node depending on group
* genauer Erläutern!
*/ */
var color = d3.scaleOrdinal() var color = d3.scaleOrdinal()
.domain(["height", "input", "depth"]) .domain(["Citedby", "Input", "Reference"])
.range([' #01d7c0', ' #8b90fe ', ' #a15eb2 ']), .range([' #01d7c0', ' #8b90fe ', ' #a15eb2 ']),
y_scale = d3.scaleOrdinal() y_scale = d3.scaleOrdinal()
.domain(["height", "input", "depth"]) .domain(["Citedby", "Input", "Reference"])
.range([0, 200, 400]), .range([0, 200, 400]),
to_remove; to_remove;
...@@ -51,7 +49,6 @@ var rect = svg.append("rect") ...@@ -51,7 +49,6 @@ var rect = svg.append("rect")
/** /**
* creates svg object (legend) and associated attributes * creates svg object (legend) and associated attributes
* transform * transform
* mehr kommentare
*/ */
var svg_legend = d3.select("svg.legendsvg"), var svg_legend = d3.select("svg.legendsvg"),
legend_position = [65,95,125], legend_position = [65,95,125],
...@@ -112,7 +109,6 @@ legend_arrow.append("text") ...@@ -112,7 +109,6 @@ legend_arrow.append("text")
* creates a new simulation * creates a new simulation
* updates the positions of the links and nodes when the * updates the positions of the links and nodes when the
state of the layout has changed (simulation has advanced by a tick) state of the layout has changed (simulation has advanced by a tick)
tertärer Operator
*/ */
var simulation = d3.forceSimulation() var simulation = d3.forceSimulation()
.force("link", d3.forceLink().id(function(d) {return d.doi;}).distance(50).strength(function(d) { .force("link", d3.forceLink().id(function(d) {return d.doi;}).distance(50).strength(function(d) {
...@@ -140,7 +136,6 @@ var g = svg.append("g") ...@@ -140,7 +136,6 @@ var g = svg.append("g")
/** /**
* loads JSON data and calls the update function * loads JSON data and calls the update function
Variable
*/ */
d3.json("json_text.json").then(function(graph) { d3.json("json_text.json").then(function(graph) {
update(graph.links, graph.nodes); update(graph.links, graph.nodes);
...@@ -268,7 +263,6 @@ function click_node(node) { ...@@ -268,7 +263,6 @@ function click_node(node) {
/** /**
* removes the highlights of the circles and their links * removes the highlights of the circles and their links
to_remove auch hier benutzen
*/ */
function click_rect() { function click_rect() {
fix_nodes(node); fix_nodes(node);
...@@ -419,7 +413,6 @@ function handle_zoom() { ...@@ -419,7 +413,6 @@ function handle_zoom() {
/** /**
* transforms svg so that the zoom is adapted to the size of the graph * transforms svg so that the zoom is adapted to the size of the graph
zoom_start initial
*/ */
function zoom_to() { function zoom_to() {
node_bounds = d3.selectAll("svg.graph").node().getBBox(); node_bounds = d3.selectAll("svg.graph").node().getBBox();
......
/** /**
* Zeilen kürzen
* creates a new zoom behavior * creates a new zoom behavior
*/ */
var zoom = d3.zoom().on("zoom", handle_zoom); var zoom = d3.zoom().on("zoom", handle_zoom);
...@@ -16,13 +15,12 @@ perc; ...@@ -16,13 +15,12 @@ perc;
/** /**
* scale functions that return y coordinate/color of node depending on group * scale functions that return y coordinate/color of node depending on group
* genauer Erläutern!
*/ */
var color = d3.scaleOrdinal() var color = d3.scaleOrdinal()
.domain(["height", "input", "depth"]) .domain(["Citedby", "Input", "Reference"])
.range([' #01d7c0', ' #8b90fe ', ' #a15eb2 ']), .range([' #01d7c0', ' #8b90fe ', ' #a15eb2 ']),
y_scale = d3.scaleOrdinal() y_scale = d3.scaleOrdinal()
.domain(["height", "input", "depth"]) .domain(["Citedby", "Input", "Reference"])
.range([0, 200, 400]), .range([0, 200, 400]),
to_remove; to_remove;
...@@ -112,7 +110,6 @@ legend_arrow.append("text") ...@@ -112,7 +110,6 @@ legend_arrow.append("text")
* creates a new simulation * creates a new simulation
* updates the positions of the links and nodes when the * updates the positions of the links and nodes when the
state of the layout has changed (simulation has advanced by a tick) state of the layout has changed (simulation has advanced by a tick)
tertärer Operator
*/ */
var simulation = d3.forceSimulation() var simulation = d3.forceSimulation()
...@@ -157,7 +154,6 @@ var gX = svg.append("g") ...@@ -157,7 +154,6 @@ var gX = svg.append("g")
/** /**
* loads JSON data and calls the update function * loads JSON data and calls the update function
Variable
*/ */
d3.json("json_text.json").then(function(graph) { d3.json("json_text.json").then(function(graph) {
update(graph.links, graph.nodes); update(graph.links, graph.nodes);
...@@ -197,7 +193,7 @@ function update(links, nodes) { ...@@ -197,7 +193,7 @@ function update(links, nodes) {
} }
/** /**
* initializes and shows xAxis THISS * initializes and shows xAxis
* @param {object} nodes - nodes * @param {object} nodes - nodes
*/ */
function updateXAxis(nodes) { function updateXAxis(nodes) {
...@@ -304,7 +300,6 @@ function click_node(node) { ...@@ -304,7 +300,6 @@ function click_node(node) {
/** /**
* removes the highlights of the circles and their links * removes the highlights of the circles and their links
to_remove auch hier benutzen
*/ */
function click_rect() { function click_rect() {
fix_nodes(node); fix_nodes(node);
...@@ -457,7 +452,6 @@ function handle_zoom() { ...@@ -457,7 +452,6 @@ function handle_zoom() {
/** /**
* transforms svg so that the zoom is adapted to the size of the graph * transforms svg so that the zoom is adapted to the size of the graph
zoom_start initial
*/ */
function zoom_to() { function zoom_to() {
node_bounds = d3.selectAll("svg.graph").node().getBBox(); node_bounds = d3.selectAll("svg.graph").node().getBBox();
......
/** /**
* Zeilen kürzen
* creates a new zoom behavior * creates a new zoom behavior
*/ */
var zoom = d3.zoom().on("zoom", handle_zoom); var zoom = d3.zoom().on("zoom", handle_zoom);
...@@ -16,13 +15,12 @@ perc; ...@@ -16,13 +15,12 @@ perc;
/** /**
* scale functions that return y coordinate/color of node depending on group * scale functions that return y coordinate/color of node depending on group
* genauer Erläutern!
*/ */
var color = d3.scaleOrdinal() var color = d3.scaleOrdinal()
.domain(["height", "input", "depth"]) .domain(["Citedby", "Input", "Reference"])
.range([' #01d7c0', ' #8b90fe ', ' #a15eb2 ']), .range([' #01d7c0', ' #8b90fe ', ' #a15eb2 ']),
y_scale = d3.scaleOrdinal() y_scale = d3.scaleOrdinal()
.domain(["height", "input", "depth"]) .domain(["Citedby", "Input", "Reference"])
.range([0, 200, 400]), .range([0, 200, 400]),
to_remove; to_remove;
...@@ -51,7 +49,6 @@ var rect = svg.append("rect") ...@@ -51,7 +49,6 @@ var rect = svg.append("rect")
/** /**
* creates svg object (legend) and associated attributes * creates svg object (legend) and associated attributes
* transform * transform
* mehr kommentare
*/ */
var svg_legend = d3.select("svg.legendsvg"), var svg_legend = d3.select("svg.legendsvg"),
legend_position = [65,95,125], legend_position = [65,95,125],
...@@ -112,7 +109,6 @@ legend_arrow.append("text") ...@@ -112,7 +109,6 @@ legend_arrow.append("text")
* creates a new simulation * creates a new simulation
* updates the positions of the links and nodes when the * updates the positions of the links and nodes when the
state of the layout has changed (simulation has advanced by a tick) state of the layout has changed (simulation has advanced by a tick)
tertärer Operator
*/ */
var simulation = d3.forceSimulation() var simulation = d3.forceSimulation()
.force("link", d3.forceLink().id(function(d) {return d.doi;}).distance(50).strength(function(d) { .force("link", d3.forceLink().id(function(d) {return d.doi;}).distance(50).strength(function(d) {
...@@ -140,7 +136,6 @@ var g = svg.append("g") ...@@ -140,7 +136,6 @@ var g = svg.append("g")
/** /**
* loads JSON data and calls the update function * loads JSON data and calls the update function
Variable
*/ */
d3.json("json_text.json").then(function(graph) { d3.json("json_text.json").then(function(graph) {
update(graph.links, graph.nodes); update(graph.links, graph.nodes);
...@@ -268,7 +263,6 @@ function click_node(node) { ...@@ -268,7 +263,6 @@ function click_node(node) {
/** /**
* removes the highlights of the circles and their links * removes the highlights of the circles and their links
to_remove auch hier benutzen
*/ */
function click_rect() { function click_rect() {
fix_nodes(node); fix_nodes(node);
...@@ -419,7 +413,6 @@ function handle_zoom() { ...@@ -419,7 +413,6 @@ function handle_zoom() {
/** /**
* transforms svg so that the zoom is adapted to the size of the graph * transforms svg so that the zoom is adapted to the size of the graph
zoom_start initial
*/ */
function zoom_to() { function zoom_to() {
node_bounds = d3.selectAll("svg.graph").node().getBBox(); node_bounds = d3.selectAll("svg.graph").node().getBBox();
......
/** /**
* Zeilen kürzen
* creates a new zoom behavior * creates a new zoom behavior
*/ */
var zoom = d3.zoom().on("zoom", handle_zoom); var zoom = d3.zoom().on("zoom", handle_zoom);
...@@ -16,13 +15,12 @@ perc; ...@@ -16,13 +15,12 @@ perc;
/** /**
* scale functions that return y coordinate/color of node depending on group * scale functions that return y coordinate/color of node depending on group
* genauer Erläutern!
*/ */
var color = d3.scaleOrdinal() var color = d3.scaleOrdinal()
.domain(["height", "input", "depth"]) .domain(["Citedby", "Input", "Reference"])
.range([' #01d7c0', ' #8b90fe ', ' #a15eb2 ']), .range([' #01d7c0', ' #8b90fe ', ' #a15eb2 ']),
y_scale = d3.scaleOrdinal() y_scale = d3.scaleOrdinal()
.domain(["height", "input", "depth"]) .domain(["Citedby", "Input", "Reference"])
.range([0, 200, 400]), .range([0, 200, 400]),
to_remove; to_remove;
...@@ -112,7 +110,6 @@ legend_arrow.append("text") ...@@ -112,7 +110,6 @@ legend_arrow.append("text")
* creates a new simulation * creates a new simulation
* updates the positions of the links and nodes when the * updates the positions of the links and nodes when the
state of the layout has changed (simulation has advanced by a tick) state of the layout has changed (simulation has advanced by a tick)
tertärer Operator
*/ */
var simulation = d3.forceSimulation() var simulation = d3.forceSimulation()
...@@ -157,7 +154,6 @@ var gX = svg.append("g") ...@@ -157,7 +154,6 @@ var gX = svg.append("g")
/** /**
* loads JSON data and calls the update function * loads JSON data and calls the update function
Variable
*/ */
d3.json("json_text.json").then(function(graph) { d3.json("json_text.json").then(function(graph) {
update(graph.links, graph.nodes); update(graph.links, graph.nodes);
...@@ -197,7 +193,7 @@ function update(links, nodes) { ...@@ -197,7 +193,7 @@ function update(links, nodes) {
} }
/** /**
* initializes and shows xAxis THISS * initializes and shows xAxis
* @param {object} nodes - nodes * @param {object} nodes - nodes
*/ */
function updateXAxis(nodes) { function updateXAxis(nodes) {
...@@ -304,7 +300,6 @@ function click_node(node) { ...@@ -304,7 +300,6 @@ function click_node(node) {
/** /**
* removes the highlights of the circles and their links * removes the highlights of the circles and their links
to_remove auch hier benutzen
*/ */
function click_rect() { function click_rect() {
fix_nodes(node); fix_nodes(node);
...@@ -457,7 +452,6 @@ function handle_zoom() { ...@@ -457,7 +452,6 @@ function handle_zoom() {
/** /**
* transforms svg so that the zoom is adapted to the size of the graph * transforms svg so that the zoom is adapted to the size of the graph
zoom_start initial
*/ */
function zoom_to() { function zoom_to() {
node_bounds = d3.selectAll("svg.graph").node().getBBox(); node_bounds = d3.selectAll("svg.graph").node().getBBox();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment