0

如何在单击时更改子气泡的颜色或在子气泡上添加悬停效果。我试过这样:

networkSeries.nodes.template.events.on('hit', e=> {
  e.target.dataItem.color = e.target.dataItem.color.lighten(-0.2)
  //networkSeries.deepInvalidate()
  //networkSeries.invalidate()
})

但它并不令人耳目一新。这是示例代码:http: //jsfiddle.net/gasnvf0j/

4

1 回答 1

1

您应该将颜色分配给fillstroke查看结果:

const newColor = e.target.dataItem.color.lighten(-0.2)
e.target.dataItem.color = newColor
e.target.fill = newColor
于 2019-04-12T18:30:26.443 回答