Class RectOptions
Defines the complete set of options for rendering an SVG rect element in chart components,
including geometry, stroke, fill, opacity, accessibility, and visibility attributes.
Inherited Members
Namespace: Syncfusion.Blazor.DataVizCommon
Assembly: Syncfusion.Blazor.dll
Syntax
public class RectOptions
Constructors
RectOptions()
Initializes a new default instance of RectOptions with all properties at their default values.
Declaration
public RectOptions()
RectOptions(string, double, double, double, double, double, string, string, double, double, double, string, string, string, string, string, string)
Initializes a new instance of RectOptions with all required SVG rect attributes.
Declaration
public RectOptions(string id, double x, double y, double width, double height, double strokeWidth, string stroke, string fill, double rx = 0, double ry = 0, double opacity = 1, string visibility = "", string style = "", string filter = "", string tabIndex = "", string ariaHidden = "true", string title = "Rect Element")
Parameters
| Type | Name | Description |
|---|---|---|
| string | id | The unique element identifier. |
| double | x | The x-coordinate of the rectangle. |
| double | y | The y-coordinate of the rectangle. |
| double | width | The width of the rectangle. |
| double | height | The height of the rectangle. |
| double | strokeWidth | The border stroke width in pixels. |
| string | stroke | The border stroke color. |
| string | fill | The fill color of the rectangle. |
| double | rx | Optional horizontal corner radius. Defaults to |
| double | ry | Optional vertical corner radius. Defaults to |
| double | opacity | Optional opacity value (0–1). Defaults to |
| string | visibility | Optional SVG visibility value. Defaults to an empty string. |
| string | style | Optional inline CSS style string. Defaults to an empty string. |
| string | filter | Optional SVG filter attribute value. Defaults to an empty string. |
| string | tabIndex | Optional tabindex for keyboard accessibility. Defaults to an empty string. |
| string | ariaHidden | Optional aria-hidden value. Defaults to |
| string | title | Optional title text. Defaults to |
Properties
AccessibilityText
Gets or sets the ARIA label text for the element, used as the aria-label attribute value for screen-reader accessibility.
Declaration
public string AccessibilityText { get; set; }
Property Value
| Type |
|---|
| string |
AriaHidden
Gets or sets the aria-hidden attribute value. Defaults to "true" to hide decorative rectangles from screen readers.
Declaration
public string AriaHidden { get; set; }
Property Value
| Type |
|---|
| string |
DashArray
Gets or sets the SVG stroke-dasharray value defining the dash pattern of the border.
Declaration
public string DashArray { get; set; }
Property Value
| Type |
|---|
| string |
Fill
Gets or sets the fill color of the rectangle. Accepts a valid CSS color string (hex or rgba).
Declaration
public string Fill { get; set; }
Property Value
| Type |
|---|
| string |
Filter
Gets or sets the SVG filter attribute value (e.g., a reference to a drop-shadow filter).
Declaration
public string Filter { get; set; }
Property Value
| Type |
|---|
| string |
Height
Gets or sets the height of the rectangle in user units.
Declaration
public double Height { get; set; }
Property Value
| Type |
|---|
| double |
Id
Gets or sets the unique identifier of the rectangle element.
Declaration
public string Id { get; set; }
Property Value
| Type |
|---|
| string |
Opacity
Gets or sets the opacity of the rectangle element. Range: 0 (transparent) to 1 (opaque).
Declaration
public double Opacity { get; set; }
Property Value
| Type |
|---|
| double |
Rx
Gets or sets the horizontal corner radius (rx) for rounded rectangles.
Declaration
public double Rx { get; set; }
Property Value
| Type |
|---|
| double |
Ry
Gets or sets the vertical corner radius (ry) for rounded rectangles.
Declaration
public double Ry { get; set; }
Property Value
| Type |
|---|
| double |
Stroke
Gets or sets the stroke color of the rectangle border. Accepts a valid CSS color string.
Declaration
public string Stroke { get; set; }
Property Value
| Type |
|---|
| string |
StrokeWidth
Gets or sets the stroke width of the rectangle border in pixels.
Declaration
public double StrokeWidth { get; set; }
Property Value
| Type |
|---|
| double |
Style
Gets or sets the inline CSS style string applied via the data-sf-style attribute.
Declaration
public string Style { get; set; }
Property Value
| Type |
|---|
| string |
TabIndex
Gets or sets the tabindex attribute value for keyboard navigation support.
Declaration
public string TabIndex { get; set; }
Property Value
| Type |
|---|
| string |
Title
Gets or sets the title attribute text providing a tooltip and accessible name for the element. Defaults to "Rect Element".
Declaration
public string Title { get; set; }
Property Value
| Type |
|---|
| string |
Transform
Gets or sets the SVG transform attribute applied to the rectangle element.
Declaration
public string Transform { get; set; }
Property Value
| Type |
|---|
| string |
Visibility
Gets or sets the SVG visibility attribute value (e.g., "visible", "hidden"). Defaults to an empty string.
Declaration
public string Visibility { get; set; }
Property Value
| Type |
|---|
| string |
Width
Gets or sets the width of the rectangle in user units.
Declaration
public double Width { get; set; }
Property Value
| Type |
|---|
| double |
X
Gets or sets the x-coordinate of the rectangle's top-left corner.
Declaration
public double X { get; set; }
Property Value
| Type |
|---|
| double |
Y
Gets or sets the y-coordinate of the rectangle's top-left corner.
Declaration
public double Y { get; set; }
Property Value
| Type |
|---|
| double |