scichart
Version:
Fast WebGL JavaScript Charting Library and Framework
74 lines (73 loc) • 3.17 kB
TypeScript
import { Point } from "../../../Core/Point";
import { EChart2DModifierType } from "../../../types/ChartModifierType";
import { EModifierType } from "../../../types/ModifierType";
import { AxisBase2D } from "../../Visuals/Axis/AxisBase2D";
import { IChartModifierBaseOptions } from "../ChartModifierBase2D";
import { ModifierMouseArgs } from "../ModifierMouseArgs";
import { EActionType, MouseWheelZoomModifier } from "../MouseWheelZoomModifier";
/**
* Options for passing to the constructor of {@link PolarMouseWheelZoomModifier} derived types
*/
export interface IPolarMouseWheelZoomModifierOptions extends IChartModifierBaseOptions {
/**
* Modifies the speed of mousewheel zoom, for example growFactor = 0.001 means each mousewheel 'click'
* zooms the chart 0.1%
*/
growFactor?: number;
/**
* The action type to use by default. See {@link EActionType} for the list of values
*/
defaultActionType?: EActionType;
/**
* If True uses length scale zoom on the radial axis, otherwise uses visible range zoom. Default True
*/
zoomSize?: boolean;
}
/**
* The PolarMouseWheelZoomModifier provides Mouse wheel zooming behavior on a 2D {@link SciChartPolarSurface}
* within SciChart - High Performance {@link https://www.scichart.com/javascript-chart-features | JavaScript Charts}
* @remarks
*
* To apply the PolarMouseWheelZoomModifier to a {@link SciChartPolarSurface} and add Mouse-wheel zoom behavior,
* use the following code:
*
* ```ts
* const sciChartSurface: SciChartPolarSurface;
* sciChartSurface.chartModifiers.add(new PolarMouseWheelZoomModifier());
* ```
*
* The speed of mouse-wheel zoom can be modified via the {@link PolarMouseWheelZoomModifier.growFactor} property.
*
* ---
* 📚 Docs: {@link https://www.scichart.com/documentation/js/v4/2d-charts/chart-modifier-api/polar-modifiers/polar-mouse-wheel-zoom-modifier/}
*/
export declare class PolarMouseWheelZoomModifier extends MouseWheelZoomModifier {
readonly type: EChart2DModifierType;
/**
* Gets or sets the default action type
*/
defaultActionType: EActionType;
/**
* If True uses length scale zoom on the radial axis, otherwise uses visible range zoom. Default True
*/
zoomSize: boolean;
/**
* Creates an instance of PolarMouseWheelZoomModifier
* @param options Optional parameters to configure the modifier via {@link IPolarMouseWheelZoomModifierOptions}
*
* ---
* 📚 Docs: {@link https://www.scichart.com/documentation/js/v4/2d-charts/chart-modifier-api/polar-modifiers/polar-mouse-wheel-zoom-modifier/}
*/
constructor(options?: IPolarMouseWheelZoomModifierOptions);
/** @inheritDoc */
get modifierType(): EModifierType;
/** @inheritDoc */
modifierMouseWheel(args: ModifierMouseArgs): void;
/** @inheritDoc */
performPan(wheelDelta: number): boolean;
toJSON(): {
type: string;
options: Required<Omit<IChartModifierBaseOptions, never>>;
};
protected growBy(mousePoint: Point, axis: AxisBase2D, fraction: number): void;
}