Here is a small example:
function test()
{
var fc = <%= fc.AppletElement %>.getFlowChart();
var sh = <%= fc.AppletElement %>.getScriptHelper();
var table1 = fc.createTable(10, 10, 20, 40);
table1.setBrush(sh.createSolidBrush(255, 255, 255, 255));
table1.redimTable(1, 3);
table1.getCell(0, 0).setText("item 1");
table1.getCell(0, 1).setText("item 2");
table1.getCell(0, 2).setText("item 3");
var table2 = fc.createTable(55, 20, 20, 40);
table2.setBrush(sh.createSolidBrush(255, 255, 222, 222));
table2.redimTable(1, 3);
table2.getCell(0, 0).setText("item 1");
table2.getCell(0, 1).setText("item 2");
table2.getCell(0, 2).setText("item 3");
var link = table1.addRelation(
0, MindFusion.Diagramming.Relationship.ManyToOne, table2, 2);
link.setSegmentCount(3);
link.getControlPoints().set(1, sh.createPointF(40, 40));
}
I hope that helps,
Stoyan