How does one use / specify a RowColumnDefinition when using method chaining instead of $ make.
I can’t figure out to do what i assume is a very basic thing:
I want to have a table with 3 columns and an unspecified number of rows.
These rows will be made using new go.Panel(‘TableRow’)
All 3 columns have a specific width, some rows may have 0 elements in a column, and i still want them to align properly. Each row should also have the same height.
export const diagramDataTableComponentTemplate = new go.Node('Table', {
width: 190
})
.add(new go.Panel('TableRow', { row:0})
.add(new go.Shape('Rectangle', {
column: 0,
fill: '#FF0000',
strokeWidth: 0,
width: 30,
height: 30,
}))
.add(new go.Shape('Rectangle', {
column: 2,
fill: '#0000ff',
strokeWidth: 0,
height: 30,
width:30,
})))
.add(new go.Panel('TableRow', {row: 1})
.add(new go.Shape('Rectangle', {
column: 0,
fill: '#0FF000',
strokeWidth: 0,
width: 30,
height: 30,
}))
.add(new go.Shape('Rectangle', {
column: 1,
fill: '#F00FFF',
strokeWidth: 0,
width: 150,
height: 30,
})))
.add(new go.Panel('TableRow', {row: 2})
.add(new go.Shape('Rectangle', {
column: 1,
fill: '#00FFF0',
strokeWidth: 0,
width: 150,
height: 30,
})))
I do not want to specify the height in each of these child elements, i just want to specify on the Table node once : ‘My column widths are [30, 150, 30], my row heights are 30’. If none of the rows have a left or right column value, that column should still take up its 30px despite being empty.