class anychart.core.utils.Bounds Improve this Doc
Extends: anychart.core.Base
Stores information about visual location of an object.
Can be defined with an object, a anychart.math#rect or as a set of numbers.
Note: "right" and "bottom" have priority over "width" and "height".
Methods Overview
Size and Position | |
bottom() | Bottom position. |
height() | Height settings. |
left() | Left position. |
maxHeight() | Maximum height. |
minHeight() | Minimum height. |
minWidth() | Minimum width. |
right() | Right position. |
top() | Top position. |
width() | Width settings. |
Size and Position. | |
maxWidth() | Maximum width |
Miscellaneous | |
set() | Resets all values of the object by passed values. |
toRect() | Normalizes all info stored in this object. |
Methods Description
bottom
Getter for the bottom edge position.
Returns:
number | string | null - Returns previously set position, not the derived pixel value.Setter for the bottom edge position.
Params:
Name | Type | Description |
---|---|---|
bottom | number | string | null | Bottom edge position to set. |
Returns:
anychart.core.utils.Bounds - Self instance for method chaining.height
Getter for the height value.
Returns:
number | string | null - Returns previously set position, not the derived pixel value.Setter for the height value.
Params:
Name | Type | Description |
---|---|---|
height | number | string | null | Height to set. |
Returns:
anychart.core.utils.Bounds - Self instance for method chaining.left
Getter for the left edge position.
Returns:
number | string | null - Returns previously set position, not the derived pixel value.Setter for the left edge position.
Params:
Name | Type | Description |
---|---|---|
left | number | string | null | Left edge position to set. |
Returns:
anychart.core.utils.Bounds - Self instance for method chaining.maxHeight
Getter for the maximum height value.
Returns:
number | string | null - Returns previously set position, not the derived pixel value.Setter for the maximum height value.
Params:
Name | Type | Description |
---|---|---|
height | number | string | null | Maximum height to set. |
Returns:
anychart.core.utils.Bounds - Self instance for method chaining.maxWidth
Getter for the maximum width value.
Returns:
number | string | null - Returns previously set position, not the derived pixel value.Setter for the maximum width value.
Params:
Name | Type | Description |
---|---|---|
width | number | string | null | Maximum width to set. |
Returns:
anychart.core.utils.Bounds - Self instance for method chaining.minHeight
Getter for the minimum height value.
Returns:
number | string | null - Returns previously set position, not the derived pixel value.Setter for the minimum height value.
Params:
Name | Type | Description |
---|---|---|
height | number | string | null | Minimum height to set. |
Returns:
anychart.core.utils.Bounds - Self instance for method chaining.minWidth
Getter for the minimum width value.
Returns:
number | string | null - Returns previously set position, not the derived pixel value.Setter for the minimum width value.
Params:
Name | Type | Description |
---|---|---|
width | number | string | null | Minimum width to set. |
Returns:
anychart.core.utils.Bounds - Self instance for method chaining.right
Getter for the right edge position.
Returns:
number | string | null - Returns previously set position, not the derived pixel value.Setter for the right edge position.
Params:
Name | Type | Description |
---|---|---|
right | number | string | null | Right edge position to set. |
Returns:
anychart.core.utils.Bounds - Self instance for method chaining.set
Resets all values of the object by passed values.
Note: 'right' and 'bottom' have priority over 'width' and 'height'.
Note: 'right' and 'bottom' have priority over 'width' and 'height'.
Params:
Name | Type | Description |
---|---|---|
xOrRect | number | string | Array.<(number|null)> | anychart.utils.RectObj | anychart.math.Rect | anychart.core.utils.Bounds | null | X-coordinate or the rect as object. |
y | number | string | null | Y-coordinate. |
width | number | string | null | Width. |
height | number | string | null | Height. |
Returns:
anychart.core.utils.Bounds - Self instance for method chaining.toRect
Normalizes all info stored in this object.
Params:
Name | Type | Description |
---|---|---|
parentLeftOrRect | number | anychart.math.Rect | Object | Optional left coordinate of the parent is used, to shift bounds if parent in shifted. |
parentTop | number | Optional top coordinate of the parent is used, to shift bounds if parent in shifted. |
parentWidth | number | Optional parent width is used, to support percent cases. |
parentHeight | number | Optional parent height is used, to support percent cases. |
Returns:
anychart.math.Rect - Returns a standard rect of object.top
Getter for the top edge position.
Returns:
number | string | null - Returns previously set position, not the derived pixel value.Setter for the top edge position.
Params:
Name | Type | Description |
---|---|---|
top | number | string | null | Top edge position to set. |
Returns:
anychart.core.utils.Bounds - Self instance for method chaining.width
Getter for the width value.
Returns:
number | string | null - Returns previously set position, not the derived pixel value.Setter for the width value.
Params:
Name | Type | Description |
---|---|---|
width | number | string | null | Width to set. |
Returns:
anychart.core.utils.Bounds - Self instance for method chaining.