DxSparkline.Type Property
Specifies the sparkline type.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v24.1.dll
NuGet Package: DevExpress.Blazor
Declaration
[DefaultValue(SparklineType.Line)]
[Parameter]
public SparklineType Type { get; set; }
Property Value
Type | Default | Description |
---|---|---|
SparklineType | Line | An enumeration value. |
Available values:
Name | Description | Image |
---|---|---|
Line | A line series. |
|
Spline | A spline series. |
|
StepLine | A step line series. |
|
Area | An area series. |
|
SplineArea | A spline area series. |
|
StepArea | A step area series. |
|
Bar | A bar series. |
|
WinLoss | A win-loss series. |
Remarks
Use the Type
property to define the sparkline type. The following code snippet renders a bar series:
<DxSparkline Data="@DataSource"
Type="SparklineType.Bar"
ArgumentFieldName="Month"
ValueFieldName="VisitorCount"
Height="50px"
Width="200px" />
@code {
IEnumerable<SparklineDataPoint> DataSource = Enumerable.Empty<SparklineDataPoint>();
protected override void OnInitialized() {
DataSource = GenerateData();
}
}
See Also