Browse Source

added group 1

master
alicestrt 4 years ago
parent
commit
b335e39baa
  1. 13
      static/css/style.css
  2. 2
      static/js/d3_map.js
  3. 90
      static/js/group1.json
  4. 74
      testing/test.json

13
static/css/style.css

@ -6,7 +6,7 @@
/*Main areas*/ /*Main areas*/
.map_area { .map_area {
text-align: center; text-align: center;
margin-top: 200px; margin-top: 20px;
height:80%; height:80%;
} }
.media_area { .media_area {
@ -20,6 +20,16 @@
height: 150px; height: 150px;
} }
.link {
stroke: #ccc;
}
.node text {
pointer-events: none;
font: 10px sans-serif;
}
svg{ width:100%; height:200%; } svg{ width:100%; height:200%; }
path{ path{
@ -134,4 +144,3 @@ draggable {
pointer-events: none; pointer-events: none;
font: 1em sans-serif; font: 1em sans-serif;
} }

2
static/js/d3_map.js

@ -11,7 +11,7 @@ var force = d3.layout.force()
.charge(-100) .charge(-100)
.size([width, height]); .size([width, height]);
d3.json("/static/js/test.json", function(error, json) { d3.json("/static/js/group1.json", function(error, json) {
if (error) throw error; if (error) throw error;
force force

90
static/js/group1.json

@ -0,0 +1,90 @@
{
"nodes": [
{
"name": "Dadaloğlu",
"group": 1,
"id":"dadaloglu"
},
{
"name": "Dedekorkut",
"group": 1
},
{
"name": "Aşık Nesimi",
"group": 1
},
{
"name": "Aşık Ali İzzet",
"group": 1
},
{
"name": "Karacaoğlan",
"group": 1
},
{
"name": "Aşık Veysel",
"group": 1
}
,
{
"name": "Neşet Ertaş",
"group": 1
}
,
{
"name": "Muharrem Ertaş",
"group": 1,
"id":"muharrem"
}
,
{
"name": "Ali Ekber Çiçek",
"group": 1
}
,
{
"name": "Dedeoğlu",
"group": 1
}
,
{
"name": "Pir Sultan Abdal",
"group": 1
},
{
"name": "Yunus Emre",
"group": 1
},
{
"name": "Kul Nesimi",
"group": 1
},
{
"name": "Kaygusuz Abdal",
"group": 1
}
],
"links": [
{
"source": 8,
"target": 0,
"value": 1
},
{
"source": 4,
"target": 11,
"value": 1
},
{
"source": 14,
"target": 11,
"value": 1
},
{
"source": 2,
"target": 11,
"value": 1
}
]
}

74
testing/test.json

@ -1,51 +1,87 @@
{ {
"nodes": [ "nodes": [
{ {
"name": "Dadaloglu", "name": "Dadaloğlu",
"group": 1, "group": 1,
"id":"dadaloglu" "id":"dadaloglu"
}, },
{ {
"name": "Muharrem Ertas", "name": "Dedekorkut",
"group": 1 "group": 1
}, },
{ {
"name": "Asik Veysel", "name": "Aşık Nesimi",
"group": 1 "group": 1
}, },
{ {
"name": "test1", "name": "Aşık Ali İzzet",
"group": 2 "group": 1
}, },
{ {
"name": "test2", "name": "Karacaoğlan",
"group": 2 "group": 1
},
{
"name": "Aşık Veysel",
"group": 1
} }
], ,
"links": [
{ {
"source": 1, "name": "Neşet Ertaş",
"target": 0, "group": 1
"value": 1 }
,
{
"name": "Muharrem Ertaş",
"group": 1
}
,
{
"name": "Ali Ekber Çiçek",
"group": 1
}
,
{
"name": "Dedeoğlu",
"group": 1
}
,
{
"name": "Pir Sultan Abdal",
"group": 1
}, },
{ {
"source": 2, "name": "Yunus Emre",
"group": 1
},
{
"name": "Kul Nesimi",
"group": 1
},
{
"name": "Kaygusuz Abdal",
"group": 1
}
],
"links": [
{
"source": 8,
"target": 0, "target": 0,
"value": 1 "value": 1
}, },
{ {
"source": 2, "source": 4,
"target": 1, "target": 11,
"value": 1 "value": 1
}, },
{ {
"source": 3, "source": 14,
"target": 2, "target": 11,
"value": 1 "value": 1
}, },
{ {
"source": 4, "source": 2,
"target": 3, "target": 11,
"value": 1 "value": 1
} }
] ]

Loading…
Cancel
Save