Skip to content
On this page

Sankey 组件

静态数据

js
[
  {
    source: "a",
    target: "a1",
    value: 3,
  },
  {
    source: "e",
    target: "b",
    value: 3,
  },
  {
    source: "a",
    target: "b1",
    value: 3,
  },
  {
    source: "b1",
    target: "a1",
    value: 1,
  },
  {
    source: "b1",
    target: "c",
    value: 2,
  },
  {
    source: "b",
    target: "c",
    value: 1,
  },
  {
    source: "e",
    target: "d",
    value: 1,
  },
];
[
  {
    source: "a",
    target: "a1",
    value: 3,
  },
  {
    source: "e",
    target: "b",
    value: 3,
  },
  {
    source: "a",
    target: "b1",
    value: 3,
  },
  {
    source: "b1",
    target: "a1",
    value: 1,
  },
  {
    source: "b1",
    target: "c",
    value: 2,
  },
  {
    source: "b",
    target: "c",
    value: 1,
  },
  {
    source: "e",
    target: "d",
    value: 1,
  },
];

属性

参数说明类型
source边的源节点名称string
target边的目标节点名称string
value边的数值,决定边的宽度number

其它配置项,可参考 echarts