AnyChart
API Reference
Still have questions?
Contact support
Top

class anychart.core.utils.OrdinalZoom Improve this Doc

Zoom settings aggregate.

Methods Overview

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

Methods Description

continuous

Getter for zoom mode.

Returns:

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

Params:

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

Returns:

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

getEndRatio

Returns zoom end ratio.

Returns:

number - Zoom end ratio.

getStartRatio

Returns zoom start ratio.

Returns:

number - Zoom start ratio

setTo

Sets 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.