<!--
为了方便我们能够复现和修复 bug,请遵从下面的规范描述您的问题。
-->


### One-line summary [问题简述]

在graph中设置focusNodeAdjacency=true以后,监听focusnodeadjacency事件时运行setOption会导致高亮效果无法正确高亮选中的点与连线。

echart.on("focusNodeAdjacency", () => {
  //运行时focusNodeAdjacency高亮异常
  echart.setOption({});
})

### Version & Environment [版本及环境]
+ ECharts version [ECharts 版本]:4.1.0
+ Browser version [浏览器类型和版本]:chrome v67.0.3396.62
+ OS Version [操作系统类型和版本]:win10





### Expected behaviour [期望结果]
图表能正常高亮选中的点与连线。




### ECharts option [ECharts配置项]
<!-- Copy and paste your 'echarts option' here. -->
<!-- [下方贴你的option,注意不要删掉下方 ```javascript 和 尾部的 ``` 字样。最好是我们能够直接运行的 
option。如何得到能运行的 option 参见上方的 guidelines for contributing] -->
```javascript
option = {
          itemStyle: {
            shadowColor: "rgba(0, 0, 0, 0.3)",
            shadowBlur: 15
          },
          tooltip: {
            show: false,
          },
          animationDuration: 2300,
          series: [
            {
              type: "graph",
              top: 'middle',
              left: 'center',
              edgeSymbol: ["circle", "arrow"],
              edgeSymbolSize: [0, 12],
              roam: true,
              symbol: 'circle',
              symbolSize: 15,
              symbolKeepAspect: true,
              focusNodeAdjacency: true,
              edgeLabel: {
                normal: {
                  show: true,
                  position: "middle",
                  padding: [5, 10],
                  formatter: "{c}"
                }
              },
              itemStyle: {
                color: "#4da1ff",
                shadowColor: "rgba(77, 161, 255, 0.3)",
                shadowBlur: 15
              },
              lineStyle: {
                normal: {
                  opacity: 0.9,
                  width: 3,
                  curveness: 0,
                  color: "#666",
                  type: "dashed"
                }
              },
              data: [
                {name:'aaa', value: '1', x: 1000, y: 0},
                {name:'bbb', value: '2', x: 500, y: 300},
                {name:'ccc', value: '3', x: 1500, y: 300}
              ],
              links: [
                {source: 'aaa', target: 'bbb', value: '100'},
                {source: 'aaa', target: 'ccc', value: '100'}
              ]
            }
          ]
        }

```




### Other comments [其他信息]
<!-- For example: Screenshot or Online demo -->
<!-- [例如,截图或线上实例 (JSFiddle/JSBin/Codepen)] -->



[ Full content available at: 
https://github.com/apache/incubator-echarts/issues/8967 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to