How to set a particular group to double wrapping column

Hi all,

I am creating a chart based on Kanban Board. Is it possible to set a particular group, eg. Problems to double wrapping column (wrappingColumn: 2), while the others are stayed with single?

Thank you.

Brian

Well, the first thing to do is to add an optional property to each lane (i.e. each Group data object) that says what the minimum width should be. Let’s call it “minBreadth”, although of course you can call the property whatever you want.

  "nodeDataArray": [
{"key":"Problems", "text":"Problems", "isGroup":true, "loc":"0 23.52284749830794" },
{"key":"Reproduced", "text":"Reproduced", "isGroup":true, "color":"0", "loc":"109 23.52284749830794", "minBreadth": 250 },
. . .

So now we just need to change how the layout, which in this sample is a PoolLayout determines how wide each lane/Group should be. That is determined by the computeLaneSize function. So I added a single line to that function:

  function computeLaneSize(lane) {
    // assert(lane instanceof go.Group);
    var sz = computeMinLaneSize(lane);
    if (lane.isSubGraphExpanded) {
      if (lane.data.minBreadth) sz.width = Math.max(sz.width, lane.data.minBreadth);
      . . .

The result:

Hi Walter,

I am trying to align nodes in a particular group with two columns by five rows for example. However, the node “text for twoB” is not horizontally aligned based the method you provided above.

Thank you.

Brian

Update:

Well, my problem is actually regarding the diagram’s size tend to decrease once there are more nodes added to it. It is later solved with dynamic height diagram