SciChart WPF 3D Charts > ChartModifier3D API > Zooming and Panning > The Orbit Modifier
The Orbit Modifier

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 OrbitModifier3D performs orbital motion of the camera giving the appearance of the chart rotating.



Declaring an OrbitModifier3D in XAML

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


<s3D:SciChart3DSurface x:Name="scs" >
    <!-- XAxis, YAxis, RenderableSeries omitted for brevity -->        
            <!-- Add the OrbitModifier3D to the chart. Optional. add other modifiers --> 
            <s3D:OrbitModifier3D DegreesPerPixel="0.2" IsEnabled="True" ExecuteOn="MouseLeftButton"/>            
var sciChart3DSurface = new SciChart3DSurface();
// XAxis, YAxis, RenderableSeries omitted for brevity
var modifierGroup = new ModifierGroup3D();
modifierGroup.ChildModifiers.Add(new OrbitModifier3D() { 
    IsEnabled = true, 
    DegreesPerPixel = 0.2f, 
    ExecuteOn = ExecuteOn.MouseLeftButton,
sciChart3DSurface.ChartModifier = modifierGroup;