alexa
menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Search Results for

    Show / Hide Table of Contents

    Class SfSparkline<TValue>

    The Sparkline Charts is a replacement for normal charts to display trends in a very small area. Customize sparklines completely by changing the series or axis type and by adding markers, data labels, range bands, and more.

    Inheritance
    object
    ComponentBase
    OwningComponentBase
    SfOwningComponentBase
    SfBaseComponent
    SfDataBoundComponent
    SfSparkline<TValue>
    Implements
    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    Inherited Members
    ComponentBase.Assets
    ComponentBase.AssignedRenderMode
    ComponentBase.DispatchExceptionAsync(Exception)
    ComponentBase.InvokeAsync(Action)
    ComponentBase.InvokeAsync(Func<Task>)
    ComponentBase.OnAfterRender(bool)
    ComponentBase.OnInitialized()
    ComponentBase.OnParametersSet()
    ComponentBase.RendererInfo
    ComponentBase.SetParametersAsync(ParameterView)
    ComponentBase.ShouldRender()
    ComponentBase.StateHasChanged()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    OwningComponentBase.IsDisposed
    OwningComponentBase.ScopedServices
    SfBaseComponent.Dispose()
    SfBaseComponent.Dispose(bool)
    SfBaseComponent.GetEffectivePlatform()
    SfBaseComponent.GetMainComponentPlatform()
    SfBaseComponent.IsMainLicenseComponent()
    SfBaseComponent.LicenseContext
    SfBaseComponent.OnObservableChange(string, object, bool, NotifyCollectionChangedEventArgs)
    SfBaseComponent.ValidateLicense()
    SfDataBoundComponent.DataManager
    SfDataBoundComponent.MainParent
    SfDataBoundComponent.OnAfterRenderAsync(bool)
    SfDataBoundComponent.OnInitializedAsync()
    SfDataBoundComponent.OnParametersSetAsync()
    SfDataBoundComponent.SetDataManager<T>(object)
    Namespace: Syncfusion.Blazor.Charts
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class SfSparkline<TValue> : SfDataBoundComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
    Type Parameters
    Name Description
    TValue

    Represents the generic data type of the sparkline control.

    Constructors

    SfSparkline()

    Declaration
    public SfSparkline()

    Properties

    DataSource

    To configure sparkline data source.

    Declaration
    [Parameter]
    public IEnumerable<TValue> DataSource { get; set; }
    Property Value
    Type Description
    IEnumerable<TValue>

    The data source for the sparkline.

    EnableGroupingSeparator

    To enable the separator.

    Declaration
    [Parameter]
    public bool EnableGroupingSeparator { get; set; }
    Property Value
    Type Description
    bool

    true, if the grouping separator can be enabled. Otherwise, false.

    EnableRtl

    Enable or disable rendering component in right to left direction.

    Declaration
    [Parameter]
    public bool EnableRtl { get; set; }
    Property Value
    Type Description
    bool

    true, if the right to left direction can be enabled for the component. The default value is false.

    EndPointColor

    To configure sparkline series last x value point color.

    Declaration
    [Parameter]
    public string EndPointColor { get; set; }
    Property Value
    Type Description
    string

    Accepts the string value. The default value is empty.

    Fill

    To configure sparkline series fill.

    Declaration
    [Parameter]
    public string Fill { get; set; }
    Property Value
    Type Description
    string

    Accepts the string value that specifies the fill color for the sparkline series.

    Format

    To apply internationalization for sparkline.

    Declaration
    [Parameter]
    public string Format { get; set; }
    Property Value
    Type Description
    string

    Accepts the string value. The default value is empty.

    Height

    To configure Sparkline height.

    Declaration
    [Parameter]
    public string Height { get; set; }
    Property Value
    Type Description
    string

    Accepts the string value. The default value is 100%.

    HighPointColor

    To configure sparkline series highest y value point color.

    Declaration
    [Parameter]
    public string HighPointColor { get; set; }
    Property Value
    Type Description
    string

    Accepts the string value. The default value is empty.

    ID

    Set the id string for the sparkline component.

    Declaration
    [Parameter]
    public string ID { get; set; }
    Property Value
    Type Description
    string

    Accepts the string value.

    LineWidth

    To configure sparkline line series width.

    Declaration
    [Parameter]
    public double LineWidth { get; set; }
    Property Value
    Type Description
    double

    Accepts the double value that specifies the width of line in sparkline chart. The default value is 1.

    LowPointColor

    To configure sparkline series lowest y value point color.

    Declaration
    [Parameter]
    public string LowPointColor { get; set; }
    Property Value
    Type Description
    string

    Accepts the string value. The default value is empty.

    NegativePointColor

    To configure sparkline series negative y value point color.

    Declaration
    [Parameter]
    public string NegativePointColor { get; set; }
    Property Value
    Type Description
    string

    Accepts the string value. The default value is empty.

    Opacity

    To configure sparkline line series opacity.

    Declaration
    [Parameter]
    public double Opacity { get; set; }
    Property Value
    Type Description
    double

    Accepts the double value that specifies the opacity of line in sparkline series. The default value is 1.

    Palette

    To configure sparkline series color palette. It applicable to column and pie type series.

    Declaration
    [Parameter]
    public string[] Palette { get; set; }
    Property Value
    Type Description
    string[]

    Accepts the string array that specifies the color palette for the sparkline series.

    Query

    Specifies the query for filter the data.

    Declaration
    [Parameter]
    public Query Query { get; set; }
    Property Value
    Type Description
    Query

    A Query object that specifies the query used to filter the data. The default value is an empty query.

    RangePadding

    To configure Sparkline series type.

    Declaration
    [Parameter]
    public SparklineRangePadding RangePadding { get; set; }
    Property Value
    Type Description
    SparklineRangePadding

    One of the SparklineRangePadding enumeration values that specifies the range padding for sparkline series. The default value is None.

    StartPointColor

    To configure sparkline series first x value point color.

    Declaration
    [Parameter]
    public string StartPointColor { get; set; }
    Property Value
    Type Description
    string

    Accepts the string value. The default value is empty.

    Theme

    To configure sparkline theme.

    Declaration
    [Parameter]
    public Theme Theme { get; set; }
    Property Value
    Type Description
    Theme

    Accepts a value from the Theme enum. The default value is Bootstrap4.

    TiePointColor

    To configure sparkline winloss series tie y value point color.

    Declaration
    [Parameter]
    public string TiePointColor { get; set; }
    Property Value
    Type Description
    string

    Accepts the string value. The default value is empty.

    Type

    To configure Sparkline series type.

    Declaration
    [Parameter]
    public SparklineType Type { get; set; }
    Property Value
    Type Description
    SparklineType

    One of the SparklineType enumeration values that specifies the type of sparkline. The default value is Line.

    ValueType

    To configure sparkline series value type.

    Declaration
    [Parameter]
    public SparklineValueType ValueType { get; set; }
    Property Value
    Type Description
    SparklineValueType

    One of the SparklineValueType enumeration values that specifies the value type for sparkline. The default value is Numeric.

    Width

    To configure Sparkline width.

    Declaration
    [Parameter]
    public string Width { get; set; }
    Property Value
    Type Description
    string

    Accepts the string value. The default value is 100%.

    XName

    To configure sparkline series xName.

    Declaration
    [Parameter]
    public string XName { get; set; }
    Property Value
    Type Description
    string

    Accepts the string value. The default value is empty.

    YName

    To configure sparkline series yName.

    Declaration
    [Parameter]
    public string YName { get; set; }
    Property Value
    Type Description
    string

    Accepts the string value. The default value is empty.

    Methods

    BuildRenderTree(RenderTreeBuilder)

    Declaration
    protected override void BuildRenderTree(RenderTreeBuilder __builder)
    Parameters
    Type Name Description
    RenderTreeBuilder __builder
    Overrides
    ComponentBase.BuildRenderTree(RenderTreeBuilder)

    RefreshAsync()

    The method is used to render the sparkline again.

    Declaration
    public Task RefreshAsync()
    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Implements

    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    In this article
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved