AnyChart
API Reference
Still have questions?
Contact support
Top
You are looking at an outdated v7 version of this document. Switch to the v8 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:

NameTypeDefaultDescription
valuestring | 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 = 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:

NameTypeDefaultDescription
valuenumber | 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
valuestring | 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
valueArray.<(number|string)> | ObjectValue 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 = currentResourceList.images();
var currentOpacity = imagesSettings.opacity();
Setter for the image opacity.

Params:

NameTypeDefaultDescription
valuenumber
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 = currentResourceList.images();
var currentSize = imagesSettings.size();
Setter for the image size in item.

Params:

NameTypeDefaultDescription
valuestring | number
"25%"
Size in pixel or percent.

Returns:

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