Class SfChart
Inherited Members
Namespace: Syncfusion.Blazor.Charts
Assembly: Syncfusion.Blazor.dll
Syntax
public class SfChart : SfDataBoundComponent
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 |
ChildContent
Represents a segment of UI content.
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
Enable or disable rendering component in right to left direction.
Declaration
public bool EnableRtl { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
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 |
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
AddAxes(List<ChartAxis>)
The method is used to add the axes in chart.
Declaration
public void AddAxes(List<ChartAxis> axisCollection)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<ChartAxis> | axisCollection | Specifies the chart axis collection. |
AddSeries(List<ChartSeries>)
The method is used to add the series collection in chart.
Declaration
public void AddSeries(List<ChartSeries> seriesCollection)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<ChartSeries> | seriesCollection | Specifies the chart series collection. |
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder | __builder |
ClearSeries()
The method is used to clear the series in chart.
Declaration
public void ClearSeries()
Export(ExportType, String, Nullable<PdfPageOrientation>, Boolean)
The method is used to perform the export functionality for the rendered chart.
Declaration
public void Export(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. |
OnAfterRenderAsync(Boolean)
Declaration
protected override Task OnAfterRenderAsync(bool firstRender)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | firstRender |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Overrides
OnInitializedAsync()
Declaration
protected override Task OnInitializedAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Overrides
OnParametersSet()
Declaration
protected override void OnParametersSet()
Print()
The method is used to perform the print functionality in chart.
Declaration
public void Print()
Refresh(Boolean)
The method is used to render the chart again.
Declaration
public void Refresh(bool isUpdateData = true)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isUpdateData | Specifies to update the chart data. |
RefreshLiveData()
The method is used to refresh the chart data live updates.
Declaration
public void RefreshLiveData()
RemoveSeries(Int32)
The method is used to remove the specific series in chart.
Declaration
public void RemoveSeries(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | Specifies the index of the series collection. |
ShouldRender()
Declaration
protected override bool ShouldRender()
Returns
Type | Description |
---|---|
System.Boolean |
UpdateChart()
The method is used to update the chart component.
Declaration
public void UpdateChart()