dxSankey
Namespace: Wisej.Web.Ext.DevExtreme
Assembly: Wisej.Web.Ext.DevExtreme (4.1.0.0)
The Sankey is a widget that visualizes the flow magnitude between value sets.
- C#
- VB.NET
public class dxSankey : dxBase
Public Class dxSankey
Inherits dxBase
Constructors
dxSankey()
Constructs a new instance of the dxSankey class.
Example:
The following example creates a Sankey diagram that shows the flow between two sets of countries.
var sankey = new dxSankey();
sankey.Options.dataSource = new[]
{
new { source = "Spain", target = "United States of America", weight = 2 },
new { source = "Germany", target = "United States of America", weight = 8 },
new { source = "France", target = "United Kingdom", weight = 4 }
};
sankey.Options.sourceField = "source";
sankey.Options.targetField = "target";
sankey.Options.weightField = "weight";
sankey.Dock = DockStyle.Fill;
this.Controls.Add(sankey);
dxSankey(options)
Constructs a new instance of the dxSankey class.
| Name | Type | Description |
|---|---|---|
| options | Object | Initial set of options. |
Example:
The following example creates a Sankey diagram with a title, wider nodes and links colored with a gradient.
var sankey = new dxSankey(new
{
dataSource = flows,
sourceField = "from",
targetField = "to",
weightField = "amount",
title = "Budget allocation",
node = new { width = 12, padding = 30 },
link = new { colorMode = "gradient" }
});
sankey.Dock = DockStyle.Fill;
this.Controls.Add(sankey);