AnyChart
API Reference
Still have questions?
Contact support
Top
You are looking at an outdated v7 version of this document. Switch to the v8 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:

NameTypeDefaultDescription
valueboolean
true
Value to set. By default a series zooms when scroller moving.

Returns:

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

getEndRatio

Returns current zoom end ratio.

Returns:

number - Current zoom end ratio.

getStartRatio

Returns current zoom start ratio.

Returns:

number - Current zoom start ratio

setTo

Sets current zoom to passed start and end ratios.

Params:

NameTypeDefaultDescription
startRationumber
0
Start ratio. Value from 0 to 1.
endRationumber
1
End ratio. Value from 0 to 1.

Returns:

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

setToPointsCount

Setups zoom by passed values.

Params:

NameTypeDefaultDescription
pointsCountnumber
Count of points
fromEndboolean
false
Whether to show zoom from start or end range.
scaleanychart.scales.Base
Value to set.

Returns:

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

setToValues

Setups zoom by passed values.

Params:

NameTypeDescription
startValue*Start value to set.
endValue*End value to set
scaleanychart.scales.BaseValue to set.

Returns:

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