dagrejs / dagre-d3

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

Custom set cluster width/height #390

Open CrashLaker opened 4 years ago

CrashLaker commented 4 years ago

Hi all.

Is it possible to set the Cluster Group Node width and height properties?

I'm trying to tweak my way out from cluster.html without success.

what didn't work so far..

g.setNode('1', {rlabel: '<span style="font-size:20px;">1</span>',
                               clusterLabelPos: 'top',
                               style: 'fill: #d3d7e8; width:500px; height:800px;',
                               labelType: 'html'})

this sets the layout like the image below: image

g.setNode('1', {rlabel: '<span style="font-size:20px;">1</span>',
                               clusterLabelPos: 'top',
                               style: 'fill: #d3d7e8;',
                               labelType: 'html', width: 500, height: 800})

image

I want the grey box to be in the vertical position.