AnyChart
API Reference
Still have questions?
Contact support
Top
You are looking at an outdated 7.7.0 version of this document. Switch to the 8.4.0 version to see the up to date information.

class anychart.graphics.vector.Image Improve this Doc

Extends: anychart.graphics.vector.Element

Image primitive.

Methods Overview

Miscellaneous
align()Preserve aspect ratio.
fittingMode()Fitting mode.
height()Getter/Setter for image height.
src()Getter/Setter for image source. Set null value for non-display image.
width()Getter/Setter for image width.
x()Getter/Setter for X coordinate.
y()Getter/Setter for Y coordinate.

Methods Description

align

Preserve aspect ratio.

Params:

NameTypeDescription
valueanychart.graphics.vector.Image.AlignPreserve aspect ratio.

Returns:

anychart.graphics.vector.Image | anychart.graphics.vector.Image.Align - Preserve aspect ratio value or this.

fittingMode

Fitting mode.

Params:

NameTypeDescription
valueanychart.graphics.vector.Image.FittingFitting mode.

height

Getter/Setter for image height.

Params:

NameTypeDescription
valuenumberImage height .

Returns:

anychart.graphics.vector.Image | number - If opt_height defined then returns Image object else image height value.

src

Getter/Setter for image source. Set null value for non-display image.

Params:

NameTypeDescription
valuestringIRI for source of image.

Returns:

anychart.graphics.vector.Image | string - If opt_src defined then returns Image object else IRI of source image .

width

Getter/Setter for image width.

Params:

NameTypeDescription
valuenumberImage width .

Returns:

anychart.graphics.vector.Image | number - If opt_width defined then returns Image object else image width value.

x

Getter/Setter for X coordinate.

Params:

NameTypeDescription
valuenumberX coordinate.

Returns:

anychart.graphics.vector.Image | number - If opt_x defined then returns Image object else X coordinate value.

y

Getter/Setter for Y coordinate.

Params:

NameTypeDescription
valuenumberY coordinate.

Returns:

anychart.graphics.vector.Image | number - If opt_y defined then returns Image object else Y coordinate value.