Top
You are looking at an outdated 7.7.0 version of this document. Switch to the 8.0.1 version to see the up to date information.

class anychart.ui.Scroller Improve this Doc

Extends: anychart.core.ui.Scroller

Scroller standalone class.

Methods Overview

Specific settings
endRatio()Ending ratio.
setRange()Sets range.
startRatio()Starting ratio.
Size and Position
getRemainingBounds()Returns the remaining (after scroller placement) part of the container.
parentBounds()Parent bounds settings.
Miscellaneous
container()Getter for the scroller current container.
draw()Draws scroller.

Methods Description

container

Getter for the scroller current container.

Returns:

string Element - The current container.

Try it:

Setter for the scroller container.

Params:

Name Type Description
value string | Element The value to set.

Returns:

anychart.ui.Scroller - Self instance for method chaining.

Try it:

draw

Draws scroller.

Returns:

anychart.ui.Scroller - Self instance for method chaining.

Try it:

endRatio

Getter for the current ending ratio.

Returns:

number - The current ending ratio.

Try it:

Setter for the ending ratio. Note: It is always greater than the startRatio.

Params:

Name Type Default Description
value number
1
Value to set.

Returns:

anychart.ui.Scroller - Self instance for method chaining.

Try it:

getRemainingBounds

Returns the remaining (after scroller placement) part of the container.

Returns:

anychart.math.Rect - Parent bounds without the space used by the scroller.

Try it:

parentBounds

Getter for bounds. As a getter falls back to stage bounds.

Returns:

anychart.math.Rect - Current bounds.

Try it:

Setter for bounds using single value.

Params:

Name Type Description
value anychart.math.Rect | Object | null Value to set

Returns:

anychart.ui.Scroller - Self instance for method chaining.

Try it:

Setter for bounds using several value.

Params:

Name Type Description
left number Left space.
top number Top space.
width number A width for a legend.
height number A height for a legend.

Returns:

anychart.ui.Scroller - Self instance for method chaining.

Try it:

setRange

Changes current selected range to the passed one.

Params:

Name Type Description
startRatio number Clamped to [0..1].
endRatio number Clamped to [0..1].

Returns:

anychart.ui.Scroller - Self instance for method chaining.

Try it:

startRatio

Getter for the current starting ratio.

Returns:

number - The current starting ratio.

Try it:

Setter for the starting ratio. Note: It is always less than the endRatio.

Params:

Name Type Default Description
value number
0
Value to set.

Returns:

anychart.ui.Scroller - Self instance for method chaining.

Try it: