Skip to main content
All docs
V24.2

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

[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

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