Skip to main content

Chart

Namespace: Wisej.Web.Ext.Syncfusion2

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

The Chart control is used to visualize the data with user interactivity and provides customizing options to configure the data visually.

public class Chart : ej2Base

Constructors​

Instance member Chart()​

Constructs a new instance of the Chart class.

Example:

The following example creates a column chart and configures it through the Options object.

var chart = new Chart();
chart.Options.title = "Monthly Sales";
chart.Options.primaryXAxis = new { valueType = "Category" };
chart.Options.series = new[]
{
new
{
type = "Column",
xName = "month",
yName = "sales",
dataSource = new[]
{
new { month = "Jan", sales = 35 },
new { month = "Feb", sales = 28 },
new { month = "Mar", sales = 42 }
}
}
};
chart.Dock = DockStyle.Fill;
this.Controls.Add(chart);

Instance member Chart(options)​

Constructs a new instance of the Chart class.

NameTypeDescription
optionsObjectInitial set of options.

Example:

The following example creates a line chart with two series bound to the same data.

var data = new[]
{
new { month = "Jan", online = 35, retail = 22 },
new { month = "Feb", online = 28, retail = 25 },
new { month = "Mar", online = 42, retail = 31 }
};
var chart = new Chart(new
{
title = "Sales by Channel",
primaryXAxis = new { valueType = "Category" },
tooltip = new { enable = true },
series = new[]
{
new { type = "Line", name = "Online", dataSource = data, xName = "month", yName = "online" },
new { type = "Line", name = "Retail", dataSource = data, xName = "month", yName = "retail" }
}
});
this.Controls.Add(chart);

Implements​