WPF Charting Documentation - SciChart WPF Charts SDK v5.x
ZoomExtentsModifier

The ZoomExtentsModifier provides the ability to zoom-to-fit the entire chart via a mouse interaction.

 

Declaring a ZoomExtentsModifier in XAML

Declaring a ZoomExtentsModifier
Copy Code
<!-- where xmlns:s="http://schemas.abtsoftware.co.uk/SciChart" -->
<s:SciChartSurface>
   <s:SciChartSurface.ChartModifier>
      <s:ModifierGroup>
            <s:ZoomExtentsModifier ExecuteOn="MouseDoubleClick"/>
         </s:ModifierGroup>
   </s:SciChartSurface.ChartModifier>
</s:SciChartSurface>

Declaring a ZoomExtentsModifier in Code

Declaring a ZoomExtentsModifier
Copy Code
var sciChartSurface = new SciChartSurface();
sciChartSurface.ChartModifier = new ModifierGroup(new ZoomExtentsModifier());

Key Properties of the ZoomExtentsModifier

The key Dependency Properties of the ZoomExtentsModifier are listed below:

Key Properties of the ZoomExtentsModifier
Copy Code
/// <summary>
/// Provides zoom to extents, or zoom to specific X and Y VisibleRange on mouse interaction
/// </summary>
/// <example>
/// The following example will create a modifier which zooms to extents on Mouse
/// Double Click
/// <code>
/// ZoomExtentsModifier z = new ZoomExtentsModifier();
/// z.ExecuteOn = ExecuteOn.MouseDoubleClick;
/// </code>
/// </example> public class ZoomExtentsModifier : ChartModifierBase
{
   /// <summary>
   /// If true, zooms to extent operations will be animated
   /// </summary>
   public static bool IsAnimatedProperty = DependencyProperty.Register(...);
  
   /// <summary>
   /// Defines the direction of the ZoomExtentsModifier
   /// </summary>
   public XyDirection XyDirectionProperty = DependencyProperty.Register(...);

   /// <summary>
   /// Determines when the <see cref=" ZoomExtentsModifier "/> executes,
   /// e.g. <see cref="ChartModifiers.ExecuteOn.MousedoubleClick"/> will cause a
   /// zoom-to-fit on mouse double click of the parent <see cref="SciChartSurface"/>
   /// </summary>
   public ExecuteOn ExecuteOnProperty = DependencyProperty.Register(...);

   // ...
} 

 

 

 


SCICHART ® is a Registered Trademark in the UK, US and EEC. Copyright SciChart Ltd 2011-2018.

Email us to give feedback!