AnyChart
API Reference
Still have questions?
Contact support
Top

class anychart.core.resource.resourceList.ImageSettings Improve this Doc

Extends: anychart.core.resource.resourceList.SettingsWithMargin

Class representing text settings for resource list items.

Methods Overview

Specific settings
opacity()Image opacity.
Size and Position
align()Image align.
borderRadius()Border radius settings.
fittingMode()Fitting mode.
margin()Margin settings.
size()Image size settings.

Methods Description

align

Getter for the image align. See anychart.graphics.vector.Image.Align

Returns:

string - Image align.
See listing
var imagesSettings = resourceList.images();
var align = imagesSettings.align();
Setter for the image align.

Params:

NameTypeDefaultDescription
alignstring | anychart.graphics.vector.Image.Align
'none'
Image align.

Returns:

anychart.core.resource.resourceList.ImageSettings - Self instance for method chaining.

borderRadius

Getter for the border radius of an image in item.

Returns:

Array.<number> - Border radius.
See listing
var imagesSettings = resourceList.images();
var borderRadius = imagesSettings.borderRadius();
Setter for the border radius of an image in item. Learn more about border radius https://www.w3schools.com/cssref/css3_pr_border-radius.asp

Params:

NameTypeDefaultDescription
bordersnumber | Array.<number>
[10]
Border radius.

Returns:

anychart.core.resource.resourceList.ImageSettings - Self instance for method chaining.

fittingMode

Getter for the fitting mode. See anychart.graphics.vector.Image.Fitting

Returns:

string - The fitting mode.
Setter for the fitting mode.

Params:

NameTypeDefaultDescription
modestring | anychart.graphics.vector.Image.Fitting
'meet'
Fitting mode.

Returns:

anychart.core.resource.resourceList.ImageSettings - Self instance for method chaining.

margin

Getter for the margin.

Returns:

anychart.core.utils.Margin - The margin.
Setter for the margin using a single value.

Params:

NameTypeDescription
marginArray.<(number|string)> | ObjectMargin to set.

Returns:

anychart.core.resource.resourceList.ImageSettings - Self instance for method chaining.
Setter for the callout margin using several values.

Params:

NameTypeDescription
value1string | numberTop or top-bottom space.
value2string | numberRight or right-left space.
value3string | numberBottom space.
value4string | numberLeft space.

Returns:

anychart.core.resource.resourceList.ImageSettings - Self instance for method chaining.

opacity

Getter for the image opacity.

Returns:

string - Image opacity.
See listing
var imagesSettings = resourceList.images();
var opacity = imagesSettings.opacity();
Setter for the image opacity.

Params:

NameTypeDefaultDescription
opacitynumber
1
Image opacity.

Returns:

anychart.core.resource.resourceList.ImageSettings - Self instance for method chaining.

size

Getter for the image size in item.

Returns:

string | number - Image size.
See listing
var imagesSettings = resourceList.images();
var size = imagesSettings.size();
Setter for the image size in item.

Params:

NameTypeDefaultDescription
sizestring | number
'25%'
Size in pixel or percent.

Returns:

anychart.core.resource.resourceList.ImageSettings - Self instance for method chaining.