Top
You are looking at an outdated 7.14.0 version of this document. Switch to the 8.0.1 version to see the up to date information.

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 = currentResourceList.images();
var currentAlign = imagesSettings.align();
Setter for the image align.

Params:

Name Type Default Description
value string | anychart.graphics.vector.Image.Align
"none"
Image align.

Returns:

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

Try it:

borderRadius

Getter for the border radius of an image in item.

Returns:

Array.<number> - Border radius.
See listing
var imagesSettings = currentResourceList.images();
var currentBorderRadius = 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:

Name Type Default Description
value number | Array.<number>
[10]
Border radius.

Returns:

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

Try it:

fittingMode

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

Returns:

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

Params:

Name Type Default Description
value string | anychart.graphics.vector.Image.Fitting
"meet"
Fitting mode.

Returns:

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

Try it:

margin

Getter for the margin.

Returns:

anychart.core.utils.Margin - The margin.

Try it:

Setter for the margin using a single value.

Params:

Name Type Description
value Array.<(number|string)> | Object Value to set.

Returns:

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

Try it:

Setter for the callout margin using several values.

Params:

Name Type Description
value1 string | number Top or top-bottom space.
value2 string | number Right or right-left space.
value3 string | number Bottom space.
value4 string | number Left space.

Returns:

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

Try it:

opacity

Getter for the image opacity.

Returns:

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

Params:

Name Type Default Description
value number
1
Image opacity.

Returns:

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

Try it:

size

Getter for the image size in item.

Returns:

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

Params:

Name Type Default Description
value string | number
"25%"
Size in pixel or percent.

Returns:

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

Try it: