Class SvgRect
Represents a Blazor component that renders an SVG rectangle element used for chart backgrounds, borders, clip regions, and legend boxes.
Inherited Members
Namespace: Syncfusion.Blazor.DataVizCommon
Assembly: Syncfusion.Blazor.dll
Syntax
public class SvgRect : SvgClass, IComponent, IHandleEvent, IHandleAfterRender
Constructors
SvgRect()
Declaration
public SvgRect()
Properties
AccessibilityText
Gets or sets the accessibility text used as an ARIA label for screen readers.
Declaration
[Parameter]
public string AccessibilityText { get; set; }
Property Value
| Type |
|---|
| string |
AriaHidden
Gets or sets the aria-hidden attribute to control visibility from assistive technologies.
Declaration
[Parameter]
public string AriaHidden { get; set; }
Property Value
| Type |
|---|
| string |
DashArray
Gets or sets the stroke dash array pattern applied to the rectangle border.
Declaration
[Parameter]
public string DashArray { get; set; }
Property Value
| Type |
|---|
| string |
Fill
Gets or sets the fill color of the rectangle.
Declaration
[Parameter]
public string Fill { get; set; }
Property Value
| Type |
|---|
| string |
Filter
Gets or sets the SVG filter attribute applied to the rectangle element.
Declaration
[Parameter]
public string Filter { get; set; }
Property Value
| Type |
|---|
| string |
Height
Gets or sets the height of the rectangle.
Declaration
[Parameter]
public double Height { get; set; }
Property Value
| Type |
|---|
| double |
Id
Gets or sets the unique identifier for the SVG rectangle element.
Declaration
[Parameter]
public override string Id { get; set; }
Property Value
| Type |
|---|
| string |
Overrides
Opacity
Gets or sets the opacity of the rectangle, ranging from 0 (transparent) to 1 (opaque).
Declaration
[Parameter]
public double Opacity { get; set; }
Property Value
| Type |
|---|
| double |
Rx
Gets or sets the horizontal corner radius for rounded rectangles.
Declaration
[Parameter]
public double Rx { get; set; }
Property Value
| Type |
|---|
| double |
Ry
Gets or sets the vertical corner radius for rounded rectangles.
Declaration
[Parameter]
public double Ry { get; set; }
Property Value
| Type |
|---|
| double |
Stroke
Gets or sets the stroke color of the rectangle border.
Declaration
[Parameter]
public string Stroke { get; set; }
Property Value
| Type |
|---|
| string |
StrokeWidth
Gets or sets the stroke width of the rectangle border.
Declaration
[Parameter]
public double StrokeWidth { get; set; }
Property Value
| Type |
|---|
| double |
Style
Gets or sets the inline CSS style applied to the rectangle element.
Declaration
[Parameter]
public string Style { get; set; }
Property Value
| Type |
|---|
| string |
TabIndex
Gets or sets the tab index for keyboard navigation accessibility.
Declaration
[Parameter]
public string TabIndex { get; set; }
Property Value
| Type |
|---|
| string |
Title
Gets or sets the title attribute providing a tooltip or accessible name for the rectangle element.
Declaration
[Parameter]
public string Title { get; set; }
Property Value
| Type |
|---|
| string |
Transform
Gets or sets the SVG transform attribute applied to the rectangle element.
Declaration
[Parameter]
public string Transform { get; set; }
Property Value
| Type |
|---|
| string |
Visibility
Gets or sets the visibility of the rectangle element (e.g., "visible" or "hidden").
Declaration
[Parameter]
public string Visibility { get; set; }
Property Value
| Type |
|---|
| string |
Width
Gets or sets the width of the rectangle.
Declaration
[Parameter]
public double Width { get; set; }
Property Value
| Type |
|---|
| double |
X
Gets or sets the x-axis coordinate of the top-left corner of the rectangle.
Declaration
[Parameter]
public double X { get; set; }
Property Value
| Type |
|---|
| double |
Y
Gets or sets the y-axis coordinate of the top-left corner of the rectangle.
Declaration
[Parameter]
public double Y { get; set; }
Property Value
| Type |
|---|
| double |
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
| Type | Name | Description |
|---|---|---|
| RenderTreeBuilder | __builder |
Overrides
ChangeFill(string)
Updates the fill color of the rectangle and triggers a re-render.
Declaration
public void ChangeFill(string color)
Parameters
| Type | Name | Description |
|---|---|---|
| string | color | The new fill color value to apply. |
ChangeStyle(string)
Updates the inline CSS style of the rectangle and triggers a re-render.
Declaration
public void ChangeStyle(string style)
Parameters
| Type | Name | Description |
|---|---|---|
| string | style | The new inline CSS style string to apply. |
ChangeWidth(double)
Updates the width of the rectangle and triggers a re-render.
Declaration
public void ChangeWidth(double width)
Parameters
| Type | Name | Description |
|---|---|---|
| double | width | The new width value to apply. |
ChangeX(double)
Updates the x-axis position of the rectangle and triggers a re-render.
Declaration
public void ChangeX(double x)
Parameters
| Type | Name | Description |
|---|---|---|
| double | x | The new x-axis coordinate value to apply. |