Skip to main content
All docs
V24.1

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.

Sparkline - Line Series

Spline

A spline series.

Sparkline - Spline Series

StepLine

A step line series.

Sparkline - Step Line Series

Area

An area series.

Sparkline - Area Series

SplineArea

A spline area series.

Sparkline - Spline Area Series

StepArea

A step area series.

Sparkline - Step Area Series

Bar

A bar series.

Sparkline - Bar Series

WinLoss

A win-loss series.

Sparkline - WinLoss 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