Class SvgText
Represents a Blazor component that renders an SVG text element used for chart axis labels, titles, data labels, and legend text.
Inherited Members
Namespace: Syncfusion.Blazor.DataVizCommon
Assembly: Syncfusion.Blazor.dll
Syntax
public class SvgText : ComponentBase, IComponent, IHandleEvent, IHandleAfterRender
Constructors
SvgText()
Declaration
public SvgText()
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 |
ChildContent
Gets or sets the child content (e.g., tspan elements) rendered inside the SVG text element.
Declaration
[Parameter]
public RenderFragment ChildContent { get; set; }
Property Value
| Type |
|---|
| RenderFragment |
ClipPath
Gets or sets the clip-path attribute to restrict the rendering area of the text element.
Declaration
[Parameter]
public string ClipPath { get; set; }
Property Value
| Type |
|---|
| string |
DominantBaseline
Gets or sets the dominant-baseline attribute controlling vertical text alignment relative to the anchor point.
Declaration
[Parameter]
public string DominantBaseline { get; set; }
Property Value
| Type |
|---|
| string |
Fill
Gets or sets the fill color (text color) of the SVG text element.
Declaration
[Parameter]
public string Fill { get; set; }
Property Value
| Type |
|---|
| string |
FontFamily
Gets or sets the font family of the text (e.g., "Segoe UI").
Declaration
[Parameter]
public string FontFamily { get; set; }
Property Value
| Type |
|---|
| string |
FontSize
Gets or sets the font size of the text (e.g., "14px").
Declaration
[Parameter]
public string FontSize { get; set; }
Property Value
| Type |
|---|
| string |
FontStyle
Gets or sets the font style of the text (e.g., "normal" or "italic").
Declaration
[Parameter]
public string FontStyle { get; set; }
Property Value
| Type |
|---|
| string |
FontWeight
Gets or sets the font weight of the text (e.g., "bold" or "normal").
Declaration
[Parameter]
public string FontWeight { get; set; }
Property Value
| Type |
|---|
| string |
HtmlAttributes
Gets or sets a dictionary of additional HTML attributes applied to the SVG text element.
Declaration
[Parameter(CaptureUnmatchedValues = true)]
public Dictionary<string, object> HtmlAttributes { get; set; }
Property Value
| Type |
|---|
| Dictionary<string, object> |
Id
Gets or sets the unique identifier for the SVG text element.
Declaration
[Parameter]
public string Id { get; set; }
Property Value
| Type |
|---|
| string |
Role
Gets or sets the ARIA role attribute for accessibility purposes.
Declaration
[Parameter]
public string Role { get; set; }
Property Value
| Type |
|---|
| string |
Style
Gets or sets the inline CSS style applied to the text 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 |
Text
Gets or sets the text content displayed in the SVG text element.
Declaration
[Parameter]
public string Text { get; set; }
Property Value
| Type |
|---|
| string |
TextAnchor
Gets or sets the text-anchor attribute controlling horizontal text alignment (e.g., "start", "middle", "end").
Declaration
[Parameter]
public string TextAnchor { get; set; }
Property Value
| Type |
|---|
| string |
Title
Gets or sets the title attribute providing a tooltip or accessible name for the text element.
Declaration
[Parameter]
public string Title { get; set; }
Property Value
| Type |
|---|
| string |
Transform
Gets or sets the SVG transform attribute applied to the text element.
Declaration
[Parameter]
public string Transform { get; set; }
Property Value
| Type |
|---|
| string |
X
Gets or sets the x-axis coordinate of the text element's anchor point.
Declaration
[Parameter]
public string X { get; set; }
Property Value
| Type |
|---|
| string |
Y
Gets or sets the y-axis coordinate of the text element's anchor point.
Declaration
[Parameter]
public string Y { get; set; }
Property Value
| Type |
|---|
| string |
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
| Type | Name | Description |
|---|---|---|
| RenderTreeBuilder | __builder |