Class SfLinearGauge
The Linear Gauge is an ideal control for visualizing numeric values in a linear scale with features like multiple axes, different orientations, and more.
Inherited Members
Namespace: Syncfusion.Blazor.LinearGauge
Assembly: Syncfusion.Blazor.dll
Syntax
public class SfLinearGauge : SfBaseComponent
Constructors
SfLinearGauge()
Initializes a new instance of the SfLinearGauge class.
Declaration
public SfLinearGauge()
Properties
AllowImageExport
Gets or sets a value indicating whether or not to enable the export as image functionality in the linear 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 functionality in linear 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 as PDF functionality in the linear 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 the linear gauge.
Declaration
public bool AllowPrint { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
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 specifies the background color of the 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 description for linear gauge.
Declaration
public string Description { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value. |
EnableGroupingSeparator
Gets or sets a value indicating whether or not to split the numeric values in the component with comma.
Declaration
public bool EnableGroupingSeparator { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Format
Gets or sets the format to apply for internationalization in linear gauge.
Declaration
public string Format { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value. |
Height
Gets or sets the height of the linear 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 linear gauge component.
Declaration
public string ID { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value. |
Orientation
Gets or sets the orientation of the rendering of the linear gauge.
Declaration
public Orientation Orientation { get; set; }
Property Value
Type | Description |
---|---|
Orientation | A value of the Orientation enumeration that specifies the orientation of linear gauge. The default value is Vertical. |
RangePalettes
Gets or sets the color palette for axis ranges in linear gauge.
Declaration
public string[] RangePalettes { get; set; }
Property Value
Type | Description |
---|---|
System.String[] | Accepts the string array that specifies the color palette for axis ranges in linear gauge. |
TabIndex
Gets or sets the tab index value for the linear gauge.
Declaration
public int TabIndex { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | An integer value that represents the tab index of linear gauge. The default value is |
Theme
Gets or sets the theme supported for the linear 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 linear gauge.
Declaration
public string Title { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value. |
Width
Gets or sets the width of the linear 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 | Accepts the string value. |
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 rendered linear 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 export type for the rendered linear gauge. |
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<System.String> | Returns base64 string. |
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 | represents the method hitting counts. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | System.Threading.Tasks.Task representing the asynchronous operation. |
Overrides
OnGaugeInitialized()
OnGaugeInitialized method is called when the component has received its initial parameters.
Declaration
protected Task OnGaugeInitialized()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | System.Threading.Tasks.Task representing the asynchronous operation. |
OnGaugeParametersSet()
OnParametersSet 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 Task OnGaugeParametersSet()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | System.Threading.Tasks.Task representing the asynchronous operation. |
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 linear gauge.
Declaration
public Task PrintAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | System.Threading.Tasks.Task representing the asynchronous operation. |
RefreshAsync()
The method is used to render the linear gauge again.
Declaration
public Task RefreshAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | System.Threading.Tasks.Task representing the asynchronous operation. |
SetAnnotationValue(Int32, String, Int32)
The method is used to set the annotation value dynamically for linear gauge.
Declaration
public void SetAnnotationValue(int annotationIndex, string content, int axisValue)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | annotationIndex | Specifies the index number of the axis in which the annotation value is to be changed. |
System.String | content | Specifies the value of the annotation to be updated in it. |
System.Int32 | axisValue | Specifies the index number of the annotation in which the value is to be changed. |
SetPointerValue(Int32, Int32, Double)
The method is used to set the pointer value dynamically for linear gauge.
Declaration
public void SetPointerValue(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. |