class anychart.core.VisualBaseWithBounds Improve this Doc
Extends: anychart.core.VisualBase
An extended base element that understands bounds settings and can handle percent values in it.
Methods Overview
Interactivity | |
enabled() | Element state (enabled or disabled). |
Size and Position | |
bottom() | Bottom bound settings. |
bounds() | Bounds settings. |
getPixelBounds() | Returns pixel bounds. |
height() | Height settings. |
left() | Left bound settings. |
maxHeight() | Maximum height. |
maxWidth() | Maximum width. |
minHeight() | Minimum height. |
minWidth() | Minimum width. |
right() | Right bound settings. |
top() | Top bound settings. |
width() | Width settings. |
zIndex() | Z-index of the element. |
Methods Description
bottom
Getter for element bottom bound settings.
Returns:
number | string | undefined - Element's bottom bound setting.Setter for element bottom bound settings.
Params:
Name | Type | Default | Description |
---|---|---|---|
bottom | number | string | null | null | Bottom bound settings for the element. |
Returns:
anychart.core.VisualBaseWithBounds - Returns self for method chaining.Try it:
bounds
Getter for element bounds settings.
Returns:
anychart.core.utils.Bounds - Bounds of the element.Setter for bounds of the element using one parameter.
Params:
Name | Type | Description |
---|---|---|
bounds | anychart.utils.RectObj | anychart.math.Rect | anychart.core.utils.Bounds | Bounds of element. |
Returns:
anychart.core.VisualBaseWithBounds - Self instance for method chaining.Try it:
Setter for element bounds settings.
Params:
Name | Type | Default | Description |
---|---|---|---|
x | number | string | null | X-coordinate. |
y | number | string | null | Y-coordinate. |
width | number | string | null | Width. |
height | number | string | null | Height. |
Returns:
anychart.core.VisualBaseWithBounds - Self instance for method chaining.Try it:
enabled
Getter for the element state (enabled or disabled).
Returns:
boolean - Element state.Try it:
Setter for the element enabled state.
Params:
Name | Type | Default | Description |
---|---|---|---|
enabled | boolean | true | Enabled state to set. |
Returns:
anychart.core.VisualBaseWithBounds - Self instance for method chaining. Example.
if (!element.enabled()) element.enabled(true);
Try it:
getPixelBounds
Returns pixel bounds of the element due to parent bounds and self bounds settings.
Returns:
anychart.math.Rect - Pixel bounds of the element.height
Getter for element height settings.
Returns:
number | string | undefined - Element's height setting.Setter for element height setting.
Params:
Name | Type | Default | Description |
---|---|---|---|
height | number | string | null | null | Height settings for the element. |
Returns:
anychart.core.VisualBaseWithBounds - Returns self for method chaining.Try it:
left
Getter for element left bound settings.
Returns:
number | string | undefined - Element's left bound setting.Setter for element left bound settings.
Params:
Name | Type | Default | Description |
---|---|---|---|
left | number | string | null | null | Left bound setting for the element. |
Returns:
anychart.core.VisualBaseWithBounds - Returns self for method chaining.Try it:
maxHeight
Getter for the maximum height.
Returns:
number | string | null - Element's maximum height.Setter for the maximum height.
Params:
Name | Type | Default | Description |
---|---|---|---|
height | number | string | null | null | Maximum height to set. |
Returns:
anychart.core.VisualBaseWithBounds - Self instance for method chaining.Try it:
maxWidth
Getter for the maximum width.
Returns:
number | string | null - Element's maximum width.Setter for the maximum width.
Params:
Name | Type | Default | Description |
---|---|---|---|
width | number | string | null | null | Maximum width to set. |
Returns:
anychart.core.VisualBaseWithBounds - Self instance for method chaining.Try it:
minHeight
Getter for the minimum height.
Returns:
number | string | null - Element's minimum height.Setter for the minimum height.
Detailed description
The method sets a minimum height of elements, that will be to remain after a resize of element.
Params:
Name | Type | Default | Description |
---|---|---|---|
height | number | string | null | null | Minimum height to set. |
Returns:
anychart.core.VisualBaseWithBounds - Self instance for method chaining.Try it:
minWidth
Getter for the minimum width.
Returns:
number | string | null - Element's minimum width.Setter for the minimum width.
Detailed description
The method sets a minimum width of elements, that will be to remain after a resize of element.
Params:
Name | Type | Default | Description |
---|---|---|---|
width | number | string | null | null | Minimum width to set. |
Returns:
anychart.core.VisualBaseWithBounds - Self instance for method chaining.Try it:
right
Getter for element right bound settings.
Returns:
number | string | undefined - Element's right bound setting.Setter for element right bound setting.
Params:
Name | Type | Default | Description |
---|---|---|---|
right | number | string | null | null | Right bound setting for the element. |
Returns:
anychart.core.VisualBaseWithBounds - Returns self for method chaining.Try it:
top
Getter for element top bound settings.
Returns:
number | string | undefined - Element's top bound setting.Setter for element top bound settings.
Params:
Name | Type | Default | Description |
---|---|---|---|
top | number | string | null | null | Top bound setting for the element. |
Returns:
anychart.core.VisualBaseWithBounds - Returns self for method chaining.Try it:
width
Getter for element width settings.
Returns:
number | string | undefined - Element's width setting.Setter for element width setting.
Params:
Name | Type | Default | Description |
---|---|---|---|
width | number | string | null | null | Width settings for the element. |
Returns:
anychart.core.VisualBaseWithBounds - Returns self for method chaining.Try it:
zIndex
Setter for the Z-index of the element.
Detailed description
The bigger the index - the higher the element position is.
Params:
Name | Type | Default | Description |
---|---|---|---|
zIndex | number | 0 | Value to set. |
Returns:
anychart.core.VisualBaseWithBounds - Self instance for method chaining.Try it: