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.ShowFirstLast Property

Specifies whether the component highlights first and last series points.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[DefaultValue(true)]
[Parameter]
public bool ShowFirstLast { get; set; }

#Property Value

Type Default Description
Boolean true

true to highlight first and last series points; otherwise, false.

#Remarks

DxSparkline highlights the first and last series points. You can use the FirstLastColor property to specify the color of such points.

The following code snippet sets the color for first and last series points:

first-last-color

<DxSparkline Data="@DataSource"
             Type="SparklineType.Bar"
             ArgumentFieldName="Month"
             ValueFieldName="VisitorCount"
             FirstLastColor="orange"
             Height="50px"
             Width="200px" />

@code {
    IEnumerable<SparklineDataPoint> DataSource = Enumerable.Empty<SparklineDataPoint>();
    protected override void OnInitialized() {
        DataSource = GenerateData();
    }
}

To disable this functionality, set the ShowFirstLast property to false:

first-last-disabled

Razor
<DxSparkline Data="@DataSource"
             Type="SparklineType.Bar"
             ShowFirstLast="false" />
See Also