1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
| var conan = echarts.init(document.getElementById("conan_container")); var option; conan.showLoading(); $.getJSON('https://asset.foolishfox.cn/files/2021/Detective-Conan.json', function (graph) { conan.hideLoading(); option = { title: { text: 'Detective Conan', top: 'bottom', left: 'right' }, tooltip: {}, legend: [{ data: graph.categories.map(function (a) { return a.name; }) }], animationDuration: 1500, animationEasingUpdate: 'quinticInOut', series: [ { name: 'Detective Conan', type: 'graph', layout: 'circular', data: graph.nodes, links: graph.links, categories: graph.categories, symbolSize: 15, value: 30, roam: true, label: { show: true, position: 'right', formatter: '{b}' }, labelLayout: { hideOverlap: true }, lineStyle: { color: 'source', curveness: 0.3 }, emphasis: { focus: 'adjacency', lineStyle: { width: 10 } }, scaleLimit: { min: 0.6, max: 3 } } ] }; conan.setOption(option); }); if (option && typeof option === 'object') { conan.setOption(option); }
|