Skip to content

Commit

Permalink
Merge pull request #267 from JunichiWatanuki/master
Browse files Browse the repository at this point in the history
不具合を修正
  • Loading branch information
JunichiWatanuki committed Apr 17, 2017
2 parents 8cf4aa9 + 7f07ad8 commit ad77b0c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion force-directed-graph/README.md
@@ -1 +1 @@
TDBなテンプレート♪====
force-directed-graph[このグラフテンプレートについて、使い方詳細を参照する。](https://github.com/e2d3/e2d3-contrib/blob/master/force-directed-graph/README.md "ReadMeを参照する。") ■可視化データフォーマット|Column|Description|Sample|Type||---|---|---|---||id|Node ID|1|Integer||label|Node name|ABC|String||source|Link source(Node ID)|1|Integer||target|Link target(Node ID)|2|Integer||value|Link data|1|Integer||color|Node color|#123456|RGB(HEX)||size|Node size|35|Num||width|Link width|5|Num||distance|Link span|120|Integer||id|label|source|target|value|color|size|width|distance| |---|---|---|---|---|---|---|---|---| |0|い|0|1|1|#ff0000|35|5|120| |1|ろ|0|2|1|#00ff00|30|4|120| |2|は|0|3|1|#00ff00|30|3|120| |3|に|0|4|1|#00ff00|30|4|120| |...|...|...|...|...|...|...|...|...| ||15|45|1|#0000ff||1|75| ||15|46|1|#ff00ff||1|75| ||16|47|1|#0000ff||1|75|
Expand Down
8 changes: 7 additions & 1 deletion force-directed-graph/main.js
Expand Up @@ -22,8 +22,14 @@ var svg = d3.select(root).append('svg')
.attr('height', height)
.attr('style', 'display: block; margin: auto;');


function update(data) {

d3.selectAll("svg").remove();
var svg = d3.select(root).append('svg')
.attr('width', width)
.attr('height', height)
.attr('style', 'display: block; margin: auto;');

/* tsv形式を一括取り込みする */
var rowdata = data.toList();

Expand Down

0 comments on commit ad77b0c

Please sign in to comment.