Skip to main content

Chart

Namespace: Wisej.Web.Ext.Webix

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

Chart is a UI-related component that helps present data in different graphic figures like colored columns, pie pieces or lines. Like all the data-presenting components it takes initial data in various formats.

public class Chart : wxBase

Constructors​

Instance member Chart()​

Constructs a new instance of the Chart class.

Example:

The following example creates a line chart and assigns the series and the data through the options.

var chart = new Chart();
chart.Options.type = "line";
chart.Options.value = "#sales#";
chart.Options.data = new[]
{
new { month = "Jan", sales = 120 },
new { month = "Feb", sales = 180 },
new { month = "Mar", sales = 150 }
};
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 bar chart with one bar for each year.

var chart = new Chart(new
{
type = "bar",
value = "#sales#",
label = "#sales#",
xAxis = new { template = "#year#" },
data = new[]
{
new { year = "2022", sales = 35 },
new { year = "2023", sales = 50 },
new { year = "2024", sales = 65 }
}
});
chart.Dock = DockStyle.Fill;
this.Controls.Add(chart);

Implements​