-1

当我将鼠标悬停在环形网络中的节点上时,如何更改边缘的颜色?

例如,在这个例子中: http: //d3plus.org/examples/basic/9034389/

鼠标悬停显示默认颜色

每当我们将鼠标悬停在 上时Alpha,都会显示默认颜色。是否可以将其更改为任何其他颜色,例如蓝色,绿色等?

4

1 回答 1

2

您可以使用 更改悬停时的颜色.color()。例如,要更改为蓝色,请使用:

var visualization = d3plus.viz()
    .color({primary: "#0000ff"}) // <--- change color on hover to blue!
    .container("#viz")  // container DIV to hold the visualization
    .type("rings")      // visualization type
    .edges(connections) // list of node connections
    .focus("alpha")     // ID of the initial center node
    .draw()             // finally, draw the visualization!
于 2017-02-27T14:22:59.120 回答