Class ImageOptions
Defines the complete set of options for rendering an SVG image element in chart components,
including position, dimensions, image URL, visibility, and aspect ratio settings.
Inherited Members
Namespace: Syncfusion.Blazor.DataVizCommon
Assembly: Syncfusion.Blazor.dll
Syntax
public class ImageOptions
Constructors
ImageOptions()
Initializes a new default instance of ImageOptions with all properties at their default values.
Declaration
public ImageOptions()
ImageOptions(string, double, double, double, double, string, string, string)
Initializes a new instance of ImageOptions with all required SVG image attributes.
Declaration
public ImageOptions(string id, double x, double y, double width, double height, string link, string visibility = "", string preserveAspectRatio = "none")
Parameters
| Type | Name | Description |
|---|---|---|
| string | id | The unique element identifier. |
| double | x | The x-coordinate of the image. |
| double | y | The y-coordinate of the image. |
| double | width | The width of the image. |
| double | height | The height of the image. |
| string | link | The image source URL or data URI. |
| string | visibility | Optional SVG visibility value. Defaults to an empty string. |
| string | preserveAspectRatio | Optional aspect ratio preservation value. Defaults to |
Properties
Height
Gets or sets the height of the image in user units.
Declaration
public double Height { get; set; }
Property Value
| Type |
|---|
| double |
Href
Gets or sets the URL or data URI of the image source, mapped to the SVG href attribute.
Declaration
public string Href { get; set; }
Property Value
| Type |
|---|
| string |
Id
Gets or sets the unique identifier of the image element.
Declaration
public string Id { get; set; }
Property Value
| Type |
|---|
| string |
PreserveAspectRatio
Gets or sets the SVG preserveAspectRatio attribute value controlling how the image scales within its viewport. Defaults to "none".
Declaration
public string PreserveAspectRatio { get; set; }
Property Value
| Type |
|---|
| string |
Visibility
Gets or sets the SVG visibility attribute value (e.g., "visible", "hidden").
Declaration
public string Visibility { get; set; }
Property Value
| Type |
|---|
| string |
Width
Gets or sets the width of the image in user units.
Declaration
public double Width { get; set; }
Property Value
| Type |
|---|
| double |
X
Gets or sets the x-coordinate of the top-left corner of the image.
Declaration
public double X { get; set; }
Property Value
| Type |
|---|
| double |
Y
Gets or sets the y-coordinate of the top-left corner of the image.
Declaration
public double Y { get; set; }
Property Value
| Type |
|---|
| double |