dagrejs / dagre-d3

A D3-based renderer for Dagre
MIT License
2.83k stars 589 forks source link

Set cluster CSS class #420

Open IlyaSemenov opened 3 years ago

IlyaSemenov commented 3 years ago

I think it makes sense to allow to set cluster CSS class names, the same way as it works for leaf nodes.

For instance, for leaf nodes, this works:

graph.setNode(`node`, { class: "state-text" })

and generates <g class="node state-text" ....

However, for clusters, it generates <g class="cluster" ... so one can't use CSS to style clusters.