echarts icon indicating copy to clipboard operation
echarts copied to clipboard

桑基图怎么定义每个link的颜色,不同于source或target

Open jhr621 opened this issue 8 years ago • 1 comments

One-line summary [问题简述]

桑基图怎么定义每个link的颜色,既不同于source,也不同于target

Version & Environment [版本及环境]

  • ECharts version [ECharts 4.0.2]:
  • Browser version [Chrome]:
  • OS Version [Win10]:

Expected behaviour [期望结果]

每个link的颜色可以自定义

ECharts option [ECharts配置项]

option = {
 //标题
title: {
            text: 'Sankey Diagram'
       },
       //工具提示
       tooltip: {
           trigger: 'item',
           triggerOn: 'mousemove'

       },
       series: [
           {
            //图的类型
               type: 'sankey',
               layout:'none',
               //图中所用数据,就是上面引入的数据,包括节点和关联两部分
               data: nodes,
               links:links,
             
             
               itemStyle: {
                   normal: {
                       borderWidth: 1,
                       borderColor: '#aaa'
                   }
               },
               //线条样式
               lineStyle: {
                   normal: {
                   	   color:'target',
                       curveness: 0.5
                   }
               }
           }
        ]
}

Other comments [其他信息]

jhr621 avatar Feb 01 '18 03:02 jhr621

已解决,see #3123 https://github.com/ecomfe/echarts/issues/3123#issuecomment-362163238

jhr621 avatar Feb 02 '18 14:02 jhr621