Sparkline
Namespace: Wisej.Web.Ext.Syncfusion2
Assembly: Wisej.Web.Ext.Syncfusion2 (4.1.0.0)
Very small chart control drawn without axes or coordinates. The sparklines are easy to interpret and convey more information to users by visualizing data in a small amount of space.
- C#
- VB.NET
public class Sparkline : ej2Base
Public Class Sparkline
Inherits ej2Base
Constructors
Sparkline()
Constructs a new instance of the Sparkline class.
Example:
The following example creates a line sparkline from a list of numbers through the Options object.
var sparkline = new Sparkline();
sparkline.Options.type = "Line";
sparkline.Options.dataSource = new[] { 5, 8, 6, 12, 9, 14, 11 };
sparkline.Size = new Size(150, 40);
this.Controls.Add(sparkline);
Sparkline(options)
Constructs a new instance of the Sparkline class.
| Name | Type | Description |
|---|---|---|
| options | Object | Initial set of options. |
Example:
The following example creates a column sparkline bound to a list of objects that highlights the highest and the lowest values.
var sparkline = new Sparkline(new
{
type = "Column",
valueType = "Category",
xName = "month",
yName = "sales",
highPointColor = "#2e7d32",
lowPointColor = "#c62828",
dataSource = new[]
{
new { month = "Jan", sales = 34 },
new { month = "Feb", sales = 28 },
new { month = "Mar", sales = 45 }
}
});
sparkline.Size = new Size(150, 40);
this.Controls.Add(sparkline);