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:
Name | Type | Default | Description |
---|---|---|---|
enabled | 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
getStartRatio
setTo
Sets 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.
Detailed description
If scale is not passed - relies on default chart X scale.
The setup is applied only in chart.draw() sequence, so it doesn't matter when you use it before draw.
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.
Detailed description
If scale is not passed - relies on default chart X scale.
The setup is applied only in chart.draw() sequence, so it doesn't matter when you use it before draw.
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: