// Sankey chart options
export function getSankeyChartOption({ isDarkMode = false, data = [], links = [] }) {
  const chartOption = {
    backgroundColor: '#FFFFFF',
    series: [
      {
        data,
        links,

        layoutIterations: 0,
        type: 'sankey',
        left: 25.0,
        top: 20.0,
        right: 120,
        bottom: 50.0,
        nodeGap: 10,
        nodeAlign: 'left',
        lineStyle: {
          color: 'source',
          curveness: 0.5,
        },
        // nodeWidth:10,
        // triggerEvent: true,
        itemStyle: {
          //color: '#1f77b4',
          //borderColor: '#1f77b4'
        },
        label: {
          color: isDarkMode
            ? '#FFFFFFD9'
            : '#000000E0',
          // fontFamily: 'Arial',
          fontSize: 14,
        },
      },
    ],
    tooltip: {
      trigger: 'item',
    },
  };

  return chartOption;
}

export default getSankeyChartOption;

