Pivot
Namespace: Wisej.Web.Ext.Webix
Assembly: Wisej.Web.Ext.Webix (4.1.0.0)
Pivot is a powerful solution dedicated to work with large data volumes.
- C#
- VB.NET
public class Pivot : wxBase
Public Class Pivot
Inherits wxBase
Constructors
Pivot()
Constructs a new instance of the Pivot class.
Example:
The following example creates a pivot, loads the data and defines which fields are used for the rows, the columns and the values.
var pivot = new Pivot();
pivot.Options.data = new[]
{
new { country = "Italy", year = 2023, sales = 120 },
new { country = "Italy", year = 2024, sales = 150 },
new { country = "France", year = 2024, sales = 90 }
};
pivot.Options.structure = new
{
rows = new[] { "country" },
columns = new[] { "year" },
values = new[] { new { name = "sales", operation = new[] { "sum" } } }
};
pivot.Dock = DockStyle.Fill;
this.Controls.Add(pivot);
Pivot(options)
Constructs a new instance of the Pivot class.
| Name | Type | Description |
|---|---|---|
| options | Object | Initial set of options. |
Example:
The following example creates a pivot that groups the rows by continent and country and shows the minimum and the total GDP for each year.
var pivot = new Pivot(new
{
structure = new
{
rows = new[] { "continent", "name" },
columns = new[] { "year" },
values = new[] { new { name = "gdp", operation = new[] { "min", "sum" } } }
},
data = new[]
{
new { continent = "Europe", name = "Italy", year = 2023, gdp = 2.3 },
new { continent = "Europe", name = "France", year = 2023, gdp = 3.0 },
new { continent = "Asia", name = "Japan", year = 2023, gdp = 4.2 }
}
});
pivot.Dock = DockStyle.Fill;
this.Controls.Add(pivot);