我试图找到一种方法来对节点之间的连接(音量)求和。我有一个数组:
var links =
[
{"source":"a0","target":"a0","s_portfolio":"a","t_portfolio":"a","SOURCE_TYPE":"APP","DES_TYPE":"APP","File_Desc":"","DataName":""},
{"source":"a1","target":"a2","s_portfolio":"a","t_portfolio":"c","SOURCE_TYPE":"APP","DES_TYPE":"APP","File_Desc":"Date","DataName":"Dates.01012016"},
{"source":"a1","target":"a2","s_portfolio":"a","t_portfolio":"c","SOURCE_TYPE":"APP","DES_TYPE":"APP","File_Desc":"Address","DataName":"Address.01012016"},
{"source":"a1","target":"a0","s_portfolio":"b","t_portfolio":"a","SOURCE_TYPE":"APP","DES_TYPE":"APP","File_Desc":"Customer Name","DataName":"Customer Name.01012016"},
{"source":"a2","target":"a3","s_portfolio":"c","t_portfolio":"d","SOURCE_TYPE":"APP","DES_TYPE":"DB","File_Desc":"Books","DataName":"Books.01012016"},
{"source":"a4","target":"a3","s_portfolio":"e","t_portfolio":"d","SOURCE_TYPE":"APP","DES_TYPE":"DB","File_Desc":"Magazines","DataName":"Magazines.01012016"},
{"source":"a4","target":"a3","s_portfolio":"e","t_portfolio":"d","SOURCE_TYPE":"APP","DES_TYPE":"DB","File_Desc":"Employees","DataName":"Employees.01012016"},
{"source":"a4","target":"a3","s_portfolio":"e","t_portfolio":"d","SOURCE_TYPE":"APP","DES_TYPE":"DB","File_Desc":"Zip","DataName":"Zip.01012016"},
{"source":"a3","target":"a4","s_portfolio":"d","t_portfolio":"e","SOURCE_TYPE":"DB","DES_TYPE":"APP","File_Desc":"PQT","DataName":"PQT.01012016"},
{"source":"a1","target":"a2","s_portfolio":"a","t_portfolio":"c","SOURCE_TYPE":"APP","DES_TYPE":"APP","File_Desc":"YTD","DataName":"YTD.01012016"}
];