Skip to main content

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.

public class Sparkline : ej2Base

Constructors​

Instance member 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);

Instance member Sparkline(options)​

Constructs a new instance of the Sparkline class.

NameTypeDescription
optionsObjectInitial 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);

Implements​