Skip to main content

dxSparkline

Namespace: Wisej.Web.Ext.DevExtreme

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

The Sparkline widget is a compact chart that contains only one series.

public class dxSparkline : dxBase

Constructors​

Instance member dxSparkline()​

Constructs a new instance of the dxSparkline class.

Example:

The following example creates a sparkline from a list of numbers and highlights the minimum and maximum values.

var sparkline = new dxSparkline();
sparkline.Options.dataSource = new[] { 4, 8, 6, 9, 5, 11, 7 };
sparkline.Options.type = "line";
sparkline.Options.showMinMax = true;
sparkline.Size = new Size(160, 40);
this.Controls.Add(sparkline);

Instance member dxSparkline(options)​

Constructs a new instance of the dxSparkline class.

NameTypeDescription
optionsObjectInitial set of options.

Example:

The following example creates a bar sparkline bound to a list of objects.

var sparkline = new dxSparkline(new
{
dataSource = new[]
{
new { month = 1, profit = 120 },
new { month = 2, profit = -40 },
new { month = 3, profit = 85 }
},
argumentField = "month",
valueField = "profit",
type = "bar"
});
sparkline.Size = new Size(160, 40);
this.Controls.Add(sparkline);

Implements​