

const getSankeyChart = (nodes, links) => {
  const option = {
    series: {
      type: 'sankey',
      layout: 'none',
      left: '5%',
      right: '12%',
      top: '5%',
      bottom: '5%',
      emphasis: {
        focus: 'adjacency'
      },
      nodeWidth: 30,
      label: {
        show: true,
        formatter: function (params) {
          return `${params.name}`;
        },
        position: 'right',
        textStyle: {
          fontSize: '14px',
          color: '#555'
        }
      },
      data: nodes,
      links: links
    }
  };

  return option
}

export default getSankeyChart