Skip to main content

Diagram

Namespace: Wisej.Web.Ext.Webix

Assembly: Wisej.Web.Ext.Webix (4.1.0.0)

Webix Diagram is a widget for building and displaying diagrams made of blocks connected by links, such as organization charts and flowcharts.

public class Diagram : wxBase

Constructors​

Instance member Diagram()​

Constructs a new instance of the Diagram class.

Example:

The following example creates a diagram with three blocks and assigns the links between them.

var diagram = new Diagram();
diagram.Options.data = new[]
{
new { id = "ceo", value = "CEO" },
new { id = "cto", value = "CTO" },
new { id = "cfo", value = "CFO" }
};
diagram.Options.links = new[]
{
new { source = "ceo", target = "cto" },
new { source = "ceo", target = "cfo" }
};
diagram.Dock = DockStyle.Fill;
this.Controls.Add(diagram);

Instance member Diagram(options)​

Constructs a new instance of the Diagram class.

NameTypeDescription
optionsObjectInitial set of options.

Example:

The following example creates a diagram that places the blocks at the specified coordinates.

var diagram = new Diagram(new
{
autoplace = false,
data = new[]
{
new { id = "start", value = "Start", x = 20, y = 20 },
new { id = "check", value = "Check order", x = 220, y = 20 },
new { id = "ship", value = "Ship", x = 420, y = 20 }
},
links = new[]
{
new { source = "start", target = "check" },
new { source = "check", target = "ship" }
}
});
diagram.Dock = DockStyle.Fill;
this.Controls.Add(diagram);

Implements​