ejPivotChart
Namespace: Wisej.Web.Ext.Syncfusion
Assembly: Wisej.Web.Ext.Syncfusion (4.1.0.0)
The pivot chart control for Essential JavaScript is a lightweight control that reads both OLAP and relational data sources and visualizes them in a graphical format with the ability to drill up and down.
- C#
- VB.NET
public class ejPivotChart : ejBase
Public Class ejPivotChart
Inherits ejBase
Constructors
ejPivotChart()
Constructs a new instance of the ejPivotChart class.
Example:
The following example creates the pivot chart and defines the relational data source through the options.
var pivotChart = new ejPivotChart();
pivotChart.Options.dataSource = new
{
data = sales,
rows = new[] { new { fieldName = "Country" } },
columns = new[] { new { fieldName = "Product" } },
values = new[] { new { fieldName = "Amount" } }
};
pivotChart.Dock = DockStyle.Fill;
this.Controls.Add(pivotChart);
ejPivotChart(options)
Constructs a new instance of the ejPivotChart class.
| Name | Type | Description |
|---|---|---|
| options | Object | Initial set of options. |
Example:
The following example creates a pivot chart that shows the amount by country and product using columns.
var pivotChart = new ejPivotChart(new
{
dataSource = new
{
data = sales,
rows = new[] { new { fieldName = "Country", fieldCaption = "Country" } },
columns = new[] { new { fieldName = "Product", fieldCaption = "Product" } },
values = new[] { new { fieldName = "Amount", fieldCaption = "Amount" } }
},
commonSeriesOptions = new { type = "column" }
});
pivotChart.Dock = DockStyle.Fill;
this.Controls.Add(pivotChart);