当前位置:   article > 正文

d3.js 搭建 d3-force-directed-graph 例子_vue中使用3d-force-graph

vue中使用3d-force-graph

d3.js 搭建  d3-force-directed-graph 例子

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <script src="https://cdn.bootcdn.net/ajax/libs/jquery/1.10.0/jquery.min.js"></script>
  7. <script src="http://d3js.org/d3.v3.min.js"></script>
  8. <style>
  9. .node {
  10. stroke: #fff;
  11. stroke-width: 1.5px;
  12. }
  13. .link {
  14. stroke: #999;
  15. stroke-opacity: .6;
  16. }
  17. </style>
  18. <title>Hello World! Site Title</title>
  19. </head>
  20. <body>
  21. <script>
  22. var width = 600,
  23. height = 400;
  24. var svg = d3.select("body")
  25. .append("svg")
  26. .attr("width", width)
  27. .attr("height", height)
  28. var links = [
  29. {source: 0, target: 1},
  30. {source: 0, target: 2},
  31. {source: 1, targ
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Gausst松鼠会/article/detail/132725
推荐阅读
相关标签
  

闽ICP备14008679号