Toggle navigation
点到点
By
Q***珊
2020-12-01 09:16:07
脚本
16
21
作品使用的第三方脚本
数据管理
上传数据
支持小于 5M 任意格式(csv, xlsx, json, xml, ...)的数据文件
上传后可以通过生成的文件链接异步获取托管的数据。
历史数据
0 条
无历史数据
代码修改记录
信息提示
保存作品
对当前截图不满意?你还可以
上传本地截图
重新截图
作品名称
作品描述
标签
geo
grid
legend
markLine
markPoint
bar
effectScatter
line
lines
map
timeline
title
toolbox
tooltip
visualMap
作品默认版本
最新
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
20:11:45
图表已生成
整理代码
刷新
代码
let nodes = [{"id":"Guangzhou Institutes of Biomedicine and Health"},{"id":"Beijing Institute of Genomics"},{"id":"University of Science and Technology of China"},{"id":"Institute of Zoology"},{"id":"Shanghai Institute of Biochemistry and Cell Biology"},{"id":"Shanghai Institute for Biological Sciences Chinese Academy of Sciences"},{"id":"Suzhou Institute of Biomedical Engineering and Technology"}] let linksSetTmp = [ {"name":"Guangzhou Institutes of Biomedicine and Health-Guangzhou Institutes of Biomedicine and Health","num":277}, {"name":"Beijing Institute of Genomics-Beijing Institute of Genomics","num":81}, {"name":"University of Science and Technology of China-University of Science and Technology of China","num":260}, {"name":"University of Science and Technology of China-Guangzhou Institutes of Biomedicine and Health","num":1}, {"name":"Institute of Zoology-Institute of Zoology","num":1}, {"name":"Shanghai Institute of Biochemistry and Cell Biology-Shanghai Institute of Biochemistry and Cell Biology","num":2}, {"name":"Shanghai Institute for Biological Sciences Chinese Academy of Sciences-Shanghai Institute for Biological Sciences Chinese Academy of Sciences","num":1}, {"name":"Institute of Zoology-Beijing Institute of Genomics","num":1}, {"name":"University of Science and Technology of China-Institute of Zoology","num":2}, {"name":"Guangzhou Institutes of Biomedicine and Health-Institute of Zoology","num":1}, {"name":"Suzhou Institute of Biomedical Engineering and Technology-Suzhou Institute of Biomedical Engineering and Technology","num":2}, {"name":"Guangzhou Institutes of Biomedicine and Health-Beijing Institute of Genomics","num":1}, {"name":"University of Science and Technology of China-Beijing Institute of Genomics","num":1}, {"name":"University of Science and Technology of China-Shanghai Institute for Biological Sciences Chinese Academy of Sciences","num":2}, {"name":"Guangzhou Institutes of Biomedicine and Health-Shanghai Institute of Biochemistry and Cell Biology","num":1}, {"name":"Institute of Zoology-Shanghai Institute of Biochemistry and Cell Biology","num":1}, {"name":"Guangzhou Institutes of Biomedicine and Health-Suzhou Institute of Biomedical Engineering and Technology","num":1}] nodes.map((item)=>{ item.symbolSize = 40 item.category = item.id item.name = item.id }) let nodesTmp = JSON.parse(JSON.stringify(nodes)) let linkList = [] let arry = null let nodeItem = {} linksSetTmp.map((item)=> { arry = item.name.split("-") linkList.push({ source: arry[0], target: arry[1] }) nodeItem = {id: arry[0], category: arry[0], symbolSize: 40, name: arry[0]} for (let i = 1; i < item.num; i++) { arry = item.name.split("-") nodeItem = {id: arry[1] + i, category: arry[0], symbolSize: 10, name: ''} linkList.push({ source: arry[0], target: arry[1] + i, }) } }) myChart.showLoading(); myChart.hideLoading(); option = { legend: [{ data: nodes.map(function (a) { return a.id; }) }], series: [ { name: 'Les Miserables', type: 'graph', layout: 'circular', circular: { rotateLabel: true }, data: nodes, links: linkList, categories: nodesTmp, label: { show: true }, roam: true, lineStyle: { color: 'source', curveness: 0.3 } } ] }; myChart.setOption(option);