Class SfCircularGauge
The circular gauge component is used to visualize the numeric values on the circular scale. The circular gauge contains labels, ticks, and an axis line to customize its appearance.
Inherited Members
Namespace: Syncfusion.Blazor.CircularGauge
Assembly: Syncfusion.Blazor.dll
Syntax
public class SfCircularGauge : SfBaseComponent
Constructors
SfCircularGauge()
Declaration
public SfCircularGauge()
Properties
AllowImageExport
Gets or sets a value indicating whether or not to enable the export to image functionality in circular gauge.
Declaration
public bool AllowImageExport { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
AllowMargin
Gets or sets a value indicating whether or not to enable the margin padding in circular gauge.
Declaration
public bool AllowMargin { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
AllowPdfExport
Gets or sets a value indicating whether or not to enable the export to pdf functionality in circular gauge.
Declaration
public bool AllowPdfExport { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
AllowPrint
Gets or sets a value indicating whether or not to enable the print functionality in circular gauge.
Declaration
public bool AllowPrint { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
AnimationDuration
Gets and sets the duration time for the loading animation in Circular Gauge.
Declaration
public double AnimationDuration { get; set; }
Property Value
Type | Description |
---|---|
System.Double | Accepts the double value to modify the duration of animation of the Circular Gauge. |
Remarks
You can modify this value to enable the animation in the Circular Gauge. If the value is set as 0, animation will be disabled.
Axes
Gets or sets the options for customizing the axes of circular gauge.
Declaration
public List<CircularGaugeAxis> Axes { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<CircularGaugeAxis> | A list of |
Background
Gets or sets the background color of the gauge. This property accepts value in hex code, rgba string as a valid CSS color string.
Declaration
public string Background { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value that represents the background color of the gauge. |
CenterX
Gets or sets the X coordinate of the circular gauge.
Declaration
public string CenterX { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value that represents the X coordinate of the circular gauge. |
CenterY
Gets or sets the Y coordinate of the circular gauge.
Declaration
public string CenterY { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value that represents the Y coordinate of the circular gauge. |
ChildContent
Gets or sets the content of the UI element.
Declaration
public RenderFragment ChildContent { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.RenderFragment | Accepts a RenderFragment that defines the content of the UI element. |
Description
Gets or sets the information about gauge for assistive technology.
Declaration
public string Description { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value that represents the information about the gauge of assistive technology. |
EnableGroupingSeparator
Gets or sets a value indicating whether or not to enable the grouping separator for a number.
Declaration
public bool EnableGroupingSeparator { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
EnablePointerDrag
Gets or sets a value indicating whether or not to enable the drag movement of the pointer in the circular gauge.
Declaration
public bool EnablePointerDrag { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
EnableRangeDrag
Gets or sets a value indicating whether or not to enable the drag movement of the ranges in the circular gauge.
Declaration
public bool EnableRangeDrag { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Height
Gets or sets the height of the circular gauge as a string in order to provide input as both like '100px' or '100%'. If specified as '100%, gauge will render to the full height of its parent element.
Declaration
public string Height { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value. |
ID
Gets or sets the id string for the circular gauge component.
Declaration
public string ID { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value. |
MoveToCenter
Gets or sets a value indicating whether or not to place the half or quarter circle in center position, if values not specified for centerX and centerY.
Declaration
public bool MoveToCenter { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
TabIndex
Gets or sets the tab index value for the circular gauge.
Declaration
public int TabIndex { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | An integer that represents the tab index value for circular gauge. The default value is |
Theme
Gets or sets the themes supported for circular gauge.
Declaration
public Theme Theme { get; set; }
Property Value
Type | Description |
---|---|
Theme | Accepts a value from the Theme enum. The default value is Material. |
Title
Gets or sets the title for circular gauge.
Declaration
public string Title { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value. The default value is empty. |
Width
Gets or sets the width of the circular gauge as a string in order to provide input as both like '100px' or '100%'. If specified as '100%, gauge will render to the full width of its parent element.
Declaration
public string Width { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string that represents the width of the circular gauge. |
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder | __builder |
Dispose(Boolean)
Disposes the property values during the destroy of the component that is hold up for the execution of the component.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
Overrides
ExportAsync(ExportType, String, Nullable<PdfPageOrientation>, Boolean)
The method is used to perform the export functionality for the circular gauge.
Declaration
public Task<string> ExportAsync(ExportType type, string fileName, Nullable<PdfPageOrientation> orientation = null, bool allowDownload = true)
Parameters
Type | Name | Description |
---|---|---|
ExportType | type | Specifies the format of the file to export the circular gauge. |
System.String | fileName | Specifies the name of the file for the exported circular gauge. |
System.Nullable<Syncfusion.PdfExport.PdfPageOrientation> | orientation | Specifies the orientation of the exported PDF document when the type parameter is PDF. |
System.Boolean | allowDownload | Specifies whether the exported file is to be downloaded or not. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.String> | Returns base64 string of the exported circular gauge when allowDownload parameter is false. |
OnAfterRenderAsync(Boolean)
OnAfterRenderAsync is a lifecycle method that is invoked each time the component is rendered in the application.
Declaration
protected override Task OnAfterRenderAsync(bool firstRender)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | firstRender | Specifies the value indicating whether the component is rendered for the first time. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | System.Threading.Tasks.Task representing the asynchronous operation. |
Overrides
OnInitializedAsync()
OnInitializedAsync method is called when the component has received its initial parameters.
Declaration
protected override Task OnInitializedAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | System.Threading.Tasks.Task representing the asynchronous operation. |
Overrides
OnParametersSetAsync()
OnParametersSetAsync is a lifecycle method that is invoked when the component has received parameters, and the incoming values have been assigned to the properties.
Declaration
protected override Task OnParametersSetAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | System.Threading.Tasks.Task representing the asynchronous operation. |
PrintAsync()
The method is used to print the rendered circular gauge.
Declaration
public Task PrintAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | System.Threading.Tasks.Task representing the asynchronous operation. |
RefreshAsync()
This method renders the circular gauge component again.
Declaration
public Task RefreshAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | System.Threading.Tasks.Task representing the asynchronous operation. |
SetAnnotationValueAsync(Int32, Int32, String)
This method is used to set the annotation content dynamically for circular gauge.
Declaration
public Task SetAnnotationValueAsync(int axisIndex, int annotationIndex, string content)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | axisIndex | Specifies the index number of the axis in which the annotation content is to be changed. |
System.Int32 | annotationIndex | Specifies the index number of the annotation in which the content is to be changed. |
System.String | content | Specifies the content of the annotation to be updated in it. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | System.Threading.Tasks.Task representing the asynchronous operation. |
SetPointerValueAsync(Int32, Int32, Double)
The method is used to set the pointer value dynamically for circular gauge.
Declaration
public Task SetPointerValueAsync(int axisIndex, int pointerIndex, double pointerValue)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | axisIndex | Specifies the index number of the axis in which the pointer value is to be changed. |
System.Int32 | pointerIndex | Specifies the index number of the pointer in which the value is to be changed. |
System.Double | pointerValue | Specifies the value of the pointer to be updated in it. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | System.Threading.Tasks.Task representing the asynchronous operation. |
SetRangeValue(Int32, Int32, Double, Double)
The method is used to set the range values dynamically for circular gauge.
Declaration
public void SetRangeValue(int axisIndex, int rangeIndex, double start, double end)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | axisIndex | Specifies the index number of the axis in which the range value is to be changed. |
System.Int32 | rangeIndex | Specifies the index number of the range in which the value is to be changed. |
System.Double | start | Specifies the start value of the range to be updated in it. |
System.Double | end | Specifies the end value of the range to be updated in it. |
ShouldRender()
Declaration
protected override bool ShouldRender()
Returns
Type |
---|
System.Boolean |
UpdateChildProperties(String, Object)
UpdateChildProperties is used to update the child properties.
Declaration
public void UpdateChildProperties(string key, object keyValue)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | Specifies the child property. |
System.Object | keyValue | Specifies the child property value. |