SciChart Android 3D Charts API > ChartModifier 3D API > Zooming and Panning > Pinch Zoom Modifier 3D
Pinch Zoom Modifier 3D

Zooming and Panning a Chart in SciChart3D is achieved by moving the SciChart3DSurface.Camera to a new location.

The article "The SciChart3DSurface Camera" goes into detail how this camera class works and how to manipulate it programatically to achieve various views.

If you want to add simple panning of the camera to the chart then you can do so using our ChartModifiers API. The PinchZoomModifier3D performs movement the camera forwards/backwards when the user pinches a touch screen giving the appearance of zooming the 3D world.
 

 

Declaring a PinchZoomModifier3D

Declaring an PinchZoomModifier3D is as simple as adding one to the SciChart3DSurface.ChartModifiers property. This can be done as a single modifier, or as part of a ModifierGroup3D.

Declaring Modifier
Copy Code
final PinchZoomModifier3D pinchZoomModifier3D = new PinchZoomModifier3D();
pinchZoomModifier3D.setIsEnabled(true);
pinchZoomModifier3D.setScaleFactor(2f);
surface3d.getChartModifiers().add(new ModifierGroup3D(pinchZoomModifier3D));