Blazor

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SfChart - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class SfChart

    Inheritance
    System.Object
    SfBaseComponent
    SfDataBoundComponent
    SfChart
    Implements
    Microsoft.AspNetCore.Components.IHandleEvent
    Inherited Members
    SfDataBoundComponent.SetDataManager<T>(Object)
    SfDataBoundComponent.OnInitializedAsync()
    SfDataBoundComponent.OnParametersSetAsync()
    SfDataBoundComponent.DataManager
    SfDataBoundComponent.MainParent
    SfBaseComponent.Dispose()
    SfBaseComponent.Dispose(Boolean)
    SfBaseComponent.OnObservableChange(String, Object, Boolean, NotifyCollectionChangedEventArgs)
    Namespace: Syncfusion.Blazor.Charts
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class SfChart : SfDataBoundComponent, ISubcomponentTracker, IHandleEvent

    Constructors

    SfChart()

    Declaration
    public SfChart()

    Properties

    AllowMultiSelection

    Option for enable to allow the multi select of the chart component.

    Declaration
    public bool AllowMultiSelection { get; set; }
    Property Value
    Type Description
    System.Boolean

    Background

    Gets and sets the background color of the chart that accepts value in hex and rgba as a valid CSS color string.

    Declaration
    public string Background { get; set; }
    Property Value
    Type Description
    System.String

    BackgroundImage

    Gets and sets the background image for chart.

    Declaration
    public string BackgroundImage { get; set; }
    Property Value
    Type Description
    System.String

    ChartScrollBarContent

    Declaration
    public ScrollbarContent ChartScrollBarContent { get; set; }
    Property Value
    Type Description
    Syncfusion.Blazor.Charts.Internal.ScrollbarContent

    ChildContent

    Declaration
    public RenderFragment ChildContent { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.RenderFragment

    CustomClass

    Gets and sets the custom class for the chart.

    Declaration
    public string CustomClass { get; set; }
    Property Value
    Type Description
    System.String

    DataSource

    Specifies the DataSource for the chart. It can be an array of JSON objects or an instance of DataManager.

    Declaration
    public IEnumerable<object> DataSource { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<System.Object>

    Description

    Gets and sets the access text for chart title.

    Declaration
    public string Description { get; set; }
    Property Value
    Type Description
    System.String

    EnableAnimation

    Option for enable the animation for chart.

    Declaration
    public bool EnableAnimation { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnableAutoIntervalOnBothAxis

    Gets and sets both axis interval will be calculated automatically with respect to the zoomed range.

    Declaration
    public bool EnableAutoIntervalOnBothAxis { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnableRtl

    Gets or sets the right to left direction that defines the text writing and user interface (UI) elements direction in layout.

    Declaration
    public bool EnableRtl { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if the chart should be in rtl direction; otherwise, false.

    EnableSideBySidePlacement

    Option for enable the side by side placement.

    Declaration
    public bool EnableSideBySidePlacement { get; set; }
    Property Value
    Type Description
    System.Boolean

    Height

    The height of the chart as a string accepts input both as '100px' or '100%'. If specified as '100%, chart renders to the full height of its parent element.

    Declaration
    public string Height { get; set; }
    Property Value
    Type Description
    System.String

    HighlightColor

    Gets and sets the highlight color for the data point when user hover the data point. 

    Declaration
    public string HighlightColor { get; set; }
    Property Value
    Type Description
    System.String

    HighlightMode

    Gets and sets the highlight mode of the chart component.

    Declaration
    public HighlightMode HighlightMode { get; set; }
    Property Value
    Type Description
    HighlightMode

    HighlightPattern

    Gets and sets the highlight pattern of the chart component.

    Declaration
    public SelectionPattern HighlightPattern { get; set; }
    Property Value
    Type Description
    SelectionPattern

    ID

    Defines id of the chart component.

    Declaration
    public string ID { get; set; }
    Property Value
    Type Description
    System.String

    IsMultiSelect

    Option for enable the multi select of the chart component.

    Declaration
    public bool IsMultiSelect { get; set; }
    Property Value
    Type Description
    System.Boolean

    IsTransposed

    Gets and sets whether the chart should be render in transposed manner or not.

    Declaration
    public bool IsTransposed { get; set; }
    Property Value
    Type Description
    System.Boolean

    Palettes

    Gets and sets the palette for the chart series.

    Declaration
    public string[] Palettes { get; set; }
    Property Value
    Type Description
    System.String[]

    Query

    Specifies query to select data from DataSource. This property is applicable only when the DataSource is SfDataManager.

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

    SelectionMode

    Gets and sets the selection mode of the chart component.

    Declaration
    public SelectionMode SelectionMode { get; set; }
    Property Value
    Type Description
    SelectionMode

    SelectionPattern

    Gets and sets the selection pattern of the chart component.

    Declaration
    public SelectionPattern SelectionPattern { get; set; }
    Property Value
    Type Description
    SelectionPattern

    SubTitle

    Gets and sets the sub title of the chart component.

    Declaration
    public string SubTitle { get; set; }
    Property Value
    Type Description
    System.String

    TabIndex

    Gets and sets the tabIndex for chart title.

    Declaration
    public double TabIndex { get; set; }
    Property Value
    Type Description
    System.Double

    Theme

    Gets and sets the theme for the chart.

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

    Title

    Gets and sets the title of the chart component.

    Declaration
    public string Title { get; set; }
    Property Value
    Type Description
    System.String

    UseGroupingSeparator

    Option for enable the group separator for yaxis label.

    Declaration
    public bool UseGroupingSeparator { get; set; }
    Property Value
    Type Description
    System.Boolean

    Width

    The width of the chart as a string accepts input as both like '100px' or '100%'. If specified as '100%, chart renders to the full width of its parent element.

    Declaration
    public string Width { get; set; }
    Property Value
    Type Description
    System.String

    Methods

    BuildRenderTree(RenderTreeBuilder)

    Declaration
    protected override void BuildRenderTree(RenderTreeBuilder __builder)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder

    ExportAsync(ExportType, String, Nullable<PdfPageOrientation>, Boolean)

    The method is used to perform the export functionality for the rendered chart.

    Declaration
    public Task ExportAsync(ExportType type, string fileName, Nullable<PdfPageOrientation> orientation = null, bool allowDownload = true)
    Parameters
    Type Name Description
    ExportType type

    Specifies the export type for the rendered chart.

    System.String fileName

    Specifies the filename.

    System.Nullable<Syncfusion.PdfExport.PdfPageOrientation> orientation

    Specifies the portrait or landscape orientation of the page.

    System.Boolean allowDownload

    Specifies whether to download or not.

    Returns
    Type Description
    System.Threading.Tasks.Task

    Export the chart with sepcifies export type.

    OnAfterRenderAsync(Boolean)

    Declaration
    protected override Task OnAfterRenderAsync(bool firstRender)
    Parameters
    Type Name Description
    System.Boolean firstRender
    Returns
    Type Description
    System.Threading.Tasks.Task
    Overrides
    SfDataBoundComponent.OnAfterRenderAsync(Boolean)

    OnInitialized()

    Declaration
    protected override void OnInitialized()

    OnParametersSet()

    Declaration
    protected override void OnParametersSet()

    PrintAsync()

    The method is used to perform the print functionality in chart.

    Declaration
    public Task PrintAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    Print the chart.

    RefreshAsync(Boolean)

    The method is used to re-render the chart.

    Declaration
    public Task RefreshAsync(bool shouldAnimate = true)
    Parameters
    Type Name Description
    System.Boolean shouldAnimate
    Returns
    Type Description
    System.Threading.Tasks.Task

    Implements

    Microsoft.AspNetCore.Components.IHandleEvent
    Back to top Generated by DocFX
    Copyright © 2001 - 2022 Syncfusion Inc. All Rights Reserved