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 |
maxWidth() | Maximum width |
minHeight() | Minimum height |
minWidth() | Minimum width |
right() | Right position |
top() | Top position |
width() | Width settings |
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 |
---|---|---|
value | number | string | null | Value 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 |
---|---|---|
value | number | string | null | Value 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 |
---|---|---|
value | number | string | null | Value 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 |
---|---|---|
value | number | string | null | Value to set. |
Returns:
anychart.core.utils.Bounds - Self instance for method chaining.maxWidth
Getter for the maximum width value.
Params:
Name | Type | Description |
---|---|---|
value | number | string | null | Value to set. |
Returns:
number | string | null - Returns previously set position, not the derived pixel value.Setter for the maximum width value.
Params:
Name | Type | Description |
---|---|---|
value | number | string | null | Value to set. |
Returns:
anychart.core.utils.Bounds - Self instance for method chaining.minHeight
Getter for the minimum height value.
Params:
Name | Type | Description |
---|---|---|
value | number | string | null | Value to set. |
Returns:
number | string | null - Returns previously set position, not the derived pixel value.Setter for the minimum height value.
Params:
Name | Type | Description |
---|---|---|
value | number | string | null | Value 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 |
---|---|---|
value | number | string | null | Value to set. |
Returns:
anychart.core.utils.Bounds - Self instance for method chaining.right
Getter fir 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 |
---|---|---|
value | number | string | null | Value 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|string|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 |
---|---|---|
value | number | string | null | Value 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 |
---|---|---|
value | number | string | null | Value to set. |
Returns:
anychart.core.utils.Bounds - Self instance for method chaining.