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

class anychart.core.utils.OrdinalZoom Improve this Doc

Zoom settings aggregate.

Methods Overview

Specific settings
getEndRatio()Returns current zoom end ratio.
getStartRatio()Returns current zoom start ratio.
Interactivity
continuous()Zoom mode.
Size and Position
setTo()Sets current zoom to passed start and end ratios.
setToPointsCount()Setups zoom by passed values.
setToValues()Setups zoom by passed values.

Methods Description

continuous

Getter for current zoom mode.

Returns:

boolean - The current value.
See listing
var zoom = chart.xZoom();
zoom.continuous();
Whether to zoom on moving of the scroller or only on mouseUp.

Params:

Name Type Default Description
value boolean
true
Value to set. By default a series zooms when scroller moving.

Returns:

anychart.core.utils.OrdinalZoom - Self instance for method chaining.

Try it:

getEndRatio

Returns current zoom end ratio.

Returns:

number - Current zoom end ratio.

Try it:

getStartRatio

Returns current zoom start ratio.

Returns:

number - Current zoom start ratio

Try it:

setTo

Sets current zoom to passed start and end ratios.

Params:

Name Type Default Description
startRatio number
0
Start ratio. Value from 0 to 1.
endRatio number
1
End ratio. Value from 0 to 1.

Returns:

anychart.core.utils.OrdinalZoom - Self instance for method chaining.

Try it:

setToPointsCount

Setups zoom by passed values.

Params:

Name Type Default Description
pointsCount number
Count of points
fromEnd boolean
false
Whether to show zoom from start or end range.
scale anychart.scales.Base
Value to set.

Returns:

anychart.core.utils.OrdinalZoom - Self instance for method chaining.

Try it:

setToValues

Setups zoom by passed values.

Params:

Name Type Description
startValue * Start value to set.
endValue * End value to set
scale anychart.scales.Base Value to set.

Returns:

anychart.core.utils.OrdinalZoom - Self instance for method chaining.

Try it: