From 442845700035b49e3d20d87893ffa5e64dbb2092 Mon Sep 17 00:00:00 2001 From: nglk Date: Thu, 15 Oct 2020 17:33:40 +0200 Subject: [PATCH] color in the node --- static/css/style.css | 4 ++++ ...2005_Hybrid_Publishing-vvvw-static-js-.txt | 1 + static/js/d3_map.js | 23 ++++--------------- static/js/group1.json | 2 +- 4 files changed, 11 insertions(+), 19 deletions(-) create mode 100644 static/js/d3/-home-angeliki-Documents-2005_Hybrid_Publishing-vvvw-static-js-.txt diff --git a/static/css/style.css b/static/css/style.css index 11d177f..e7f9fc9 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -29,6 +29,10 @@ font: 10px sans-serif; } +#dadaloglu text { + fill:red; +} + svg{ width:100%; height:200%; } diff --git a/static/js/d3/-home-angeliki-Documents-2005_Hybrid_Publishing-vvvw-static-js-.txt b/static/js/d3/-home-angeliki-Documents-2005_Hybrid_Publishing-vvvw-static-js-.txt new file mode 100644 index 0000000..88592f1 --- /dev/null +++ b/static/js/d3/-home-angeliki-Documents-2005_Hybrid_Publishing-vvvw-static-js-.txt @@ -0,0 +1 @@ +/home/angeliki/Documents/2005_Hybrid_Publishing/vvvw/static/js/test.json \ No newline at end of file diff --git a/static/js/d3_map.js b/static/js/d3_map.js index e850d66..ac7e264 100644 --- a/static/js/d3_map.js +++ b/static/js/d3_map.js @@ -1,13 +1,13 @@ var width = 960, - height = 500 + height = 700 var svg = d3.select(".map_area").append("svg") .attr("width", width) .attr("height", height); var force = d3.layout.force() - .gravity(0.05) - .distance(200) + .gravity(0.01) + .distance(400) .charge(-100) .size([width, height]); @@ -29,6 +29,7 @@ d3.json("/static/js/group1.json", function(error, json) { .enter().append("g") .attr("class", "node") .attr("id", function(d){return d.id}) + // .style("fill",function (d) { return 'red'; }) // .on("click", function(d){ // scrolldiv(d); // play(d); @@ -59,8 +60,6 @@ d3.json("/static/js/group1.json", function(error, json) { }); // scripts for mouse events -// popup - // function popup() { $("#dadaloglu").click(function(){ $("#showdadaloglu").fadeIn() console.log("around") @@ -80,8 +79,8 @@ d3.json("/static/js/group1.json", function(error, json) { audio2.currentTime = 50; // audio2.play(); }); - // }; +//pop-up $(document).click(function (e) { if (!$(e.target).parents().andSelf().is('#dadaloglu')) { $("#showdadaloglu").fadeOut(); @@ -94,16 +93,4 @@ d3.json("/static/js/group1.json", function(error, json) { }; }); -// scroll -// $("#dadaloglu").click(function(){ -// var elem = document.getElementById("ele"); -// elem.scrollIntoView(); -// }); - - - - - - - }); diff --git a/static/js/group1.json b/static/js/group1.json index a452ddd..fb7bfc0 100644 --- a/static/js/group1.json +++ b/static/js/group1.json @@ -77,7 +77,7 @@ "value": 1 }, { - "source": 14, + "source": 1, "target": 11, "value": 1 },