树状图-协议

  1. {
  2. nodes: [
  3. {
  4. level: 1,
  5. id: '0', // 节点id,字符串类型
  6. label: '1000', // 节点文本 ,
  7. text: '\ue60c', // 图标,
  8. backgroundConfig: {
  9. fill: '#ec686e',// 图标背景
  10. },
  11. avgNum: 300, // 业务属性
  12. },
  13. ],
  14. edges: [
  15. {
  16. source: '0', // 连线起始端节点id
  17. target: '1',
  18. label: '50%', // 连线文本
  19. style: {
  20. stroke: 'red', // 连线颜色
  21. },
  22. },
  23. {
  24. source: '0',
  25. target: '2',
  26. },
  27. ],
  28. }
节点名称 图标 图标背景
image.png \ue60c #ec686e
image.png \ue63c #817b49
image.png \ue6e9 #16c2c2
image.png \ue641 #6982ef