class anychart.core.VisualBase Improve this Doc
Extends: anychart.core.Base
Base class for all elements.
Methods Overview
Export | |
print() | Prints all elements. |
Interactivity | |
enabled() | Element state (enabled or disabled). |
Size and Position | |
zIndex() | Z-index of the element. |
Miscellaneous | |
container() | Container for the elements. |
parentBounds() | Getter for the parent bounds. |
Methods Description
container
Getter for the container.
Returns:
anychart.graphics.vector.Layer | anychart.graphics.vector.Stage - An instance of the class for method chaining.Setter for the container.
Params:
Name | Type | Description |
---|---|---|
element | anychart.graphics.vector.Layer | anychart.graphics.vector.Stage | string | Element | The value to set. |
Returns:
anychart.core.VisualBase - Self instance for method chaining.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.VisualBase - Self instance for method chaining. Example.
if (!element.enabled()) element.enabled(true);
Try it:
parentBounds
Getter for the parent bounds.
Bounds that would be used in case of percent size calculations. Expects pixel values only.
Bounds that would be used in case of percent size calculations. Expects pixel values only.
Returns:
anychart.math.Rect - The parent bounds of the element.Setter for the parent bounds using single value.
Bounds that would be used in case of percent size calculations. Expects pixel values only.
Bounds that would be used in case of percent size calculations. Expects pixel values only.
Params:
Name | Type | Description |
---|---|---|
bounds | anychart.math.Rect | Object | number | null | Bounds to set. |
Returns:
anychart.core.VisualBase - Self instance for method chaining.Setter for the parent bounds using several values.
Bounds that would be used in case of percent size calculations. Expects pixel values only.
Bounds that would be used in case of percent size calculations. Expects pixel values only.
Params:
Name | Type | Description |
---|---|---|
left | number | Left space. |
top | number | Top space. |
width | number | Element width. |
height | number | Element height. |
Returns:
anychart.core.VisualBase - Self instance for method chaining.Prints all elements on related stage.
Params:
Name | Type | Default | Description |
---|---|---|---|
paperSizeOrOptions | anychart.graphics.vector.PaperSize | Object | Paper size or object with options. | |
landscape | boolean | false | Flag of landscape. |
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.VisualBase - Self instance for method chaining.Try it: