igDataChart
Namespace: Wisej.Web.Ext.Ignite
Assembly: Wisej.Web.Ext.Ignite (4.1.0.0)
The igDataChart is a charting control for rendering various kinds of charts into HTML5 Web applications and sites. It uses the new Canvas tag in HTML5 to plot data series on web pages.
- C#
- VB.NET
public class igDataChart : igBase
Public Class igDataChart
Inherits igBase
Constructors
igDataChart()
Constructs a new instance of the igDataChart class.
Example:
The following example creates a column chart and configures the axes and the series through the Options object.
var chart = new igDataChart();
chart.Options.dataSource = monthlySales;
chart.Options.axes = new object[]
{
new { name = "xAxis", type = "categoryX", label = "Month" },
new { name = "yAxis", type = "numericY" }
};
chart.Options.series = new[]
{
new { name = "revenue", type = "column", xAxis = "xAxis", yAxis = "yAxis", valueMemberPath = "Revenue" }
};
chart.Dock = DockStyle.Fill;
this.Controls.Add(chart);
igDataChart(options)
Constructs a new instance of the igDataChart class using the specified options.
| Name | Type | Description |
|---|---|---|
| options | Object | Initial set of options passed to the igDataChart widget: an anonymous object, a JSON string or a dynamic object. |
Example:
The following example creates a chart with two line series that share the same axes.
var chart = new igDataChart(new
{
title = "Revenue and Expenses",
dataSource = monthlySales,
axes = new object[]
{
new { name = "xAxis", type = "categoryX", label = "Month" },
new { name = "yAxis", type = "numericY" }
},
series = new[]
{
new { name = "revenue", title = "Revenue", type = "line", xAxis = "xAxis", yAxis = "yAxis", valueMemberPath = "Revenue" },
new { name = "expenses", title = "Expenses", type = "line", xAxis = "xAxis", yAxis = "yAxis", valueMemberPath = "Expenses" }
}
});
chart.Dock = DockStyle.Fill;
this.Controls.Add(chart);