Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DxSparkline.Type Property

Specifies the sparkline type.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[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