Pre loader

Mouse Wheel Zoom keeps on increasing the chart range



I’m tying out some of the SciStockChart WPF features on the trial version and having trouble with limiting the chart area to the assigned data.

You can easily reproduce my problem on the demo app:
1. Open Featured Apps>>Financial Charts>>SciChart Trader Demo app
2. Move the mouse cursor in the middle of the chart
3. Mouse wheel to zoom in really close
4. Zoom Back out you can see the empty space on the right size became larger
5. You can do 3-4 steps again and with every iteration you get more open space.
6.Plus it gets out of sync with the scroll pane below.

How do we limit the view to the assigned data?

BTW, I can get it work by directly using SciChartSurface (I created that test app based on other demo apps).

Would love to learn how to get it working with SciStockChart.

Thanks in advance!

  • You must to post comments

What you’ve just described is the default behaviour of SciStockChart, which is a SciChartSurface with several modifiers included out of the box, such as:

  • RolloverModifier
  • CursorModifier
  • MouseWheelZoomPanModifier
  • ZoomPanModifier
  • RubberBandXyZoomModifier
  • ZoomExtentsModifier

You can read more about what SciStockChart is, here: SciStockChart – Simplified Financial Charts

So essentially, the ability to zoom anywhere you like with a mousewheel is by design. At any time, zoom can be reset by double-clicking on the chart.

If you want fine-grained control over the chart, I would suggest using a SciChartSurface. This way you get to decide what modifiers, what axis types, what behaviours you put on the chart. You can read more about the ChartModifier API (which adds zoom, pan, mousewheel and cursor behaviours) here.

If you want to limit the zoom on the chart, you can do this with a SciChartSurface or a SciStockChart (a little bit more difficult as requires access to the Axis) using this technique here.

Best regards,

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies