Skip to main content

PolarZoomExtentsModifier

SciChart.js provides the ability to Zoom Extents the polar chart (zoom to fit data) by double-clicking the chart area with the PolarZoomExtentsModifieršŸ“˜, available out of the box.

Here is how to define the PolarZoomExtentsModifieršŸ“˜ in your code:

const { PolarZoomExtentsModifier, Point } = SciChart;
// or for npm: import { PolarZoomExtentsModifier } from "scichart";

sciChartSurface.chartModifiers.add(
// Zoom Extents Modifier:
new PolarZoomExtentsModifier({
centerPoint: new Point(0, 0),
animationDuration: 1000,
innerRadius: 0.2
})
);

Zoom to a Preset Range​

If you would like the double-click to zoom to some preset range, rather than the data range, you can set zoomExtentsRange on the axes. In addition, if you are setting an initial visibleRange on an axis and would like zoomExtents to return to this range, you can just set zoomExtentsToInitialRange true, which will set zoomExtentsRange to the visibleRange passed in.

Besides common features which are inherited from the base ZoomExtentsModifieršŸ“˜ class, the PolarZoomExtentsModifieršŸ“˜ has many more polar-specific features, such as:

PropertyTypeDescription
xStartAnglešŸ“˜numberThe start angle for the X-axis in the polar chart.
yStartAnglešŸ“˜numberThe start angle for the Y-axis in the polar chart.
totalAnglešŸ“˜numberThe total angle of the polar chart, which defines the range of angles covered by the chart.
lengthScalešŸ“˜numberThe scale factor for the radian axis
innerRadiusšŸ“˜numberThe inner radius of the polar chart, which defines the minimum distance from the center to the edge of the chart.
centerPointšŸ“˜PointšŸ“˜Center point of the polar chart, which defines the origin of the polar coordinates.
resetStartAnglesšŸ“˜booleanWhether to reset the start angles for both the X and Y axes to their initial values.
resetTotalAnglešŸ“˜booleanWhether to reset the total angle to its initial value.
resetRangesšŸ“˜booleanWhether to reset the ranges for both the radial and angular axes to their initial values.
resetLengthScalešŸ“˜booleanWhether to reset the length scale to its initial value.
resetCenterPointšŸ“˜booleanWhether to reset the center point to its initial value.
resetInnerRadiusšŸ“˜booleanWhether to reset the inner radius to its initial value.

See all at IPolarZoomExtentsModifierOptionsšŸ“˜.

See Also​