Pre loader

RubberBandXyZoomModifier when mouse leaves chart area not working


Is it possible, in version 2.2.2404, to have RubberBandXyZoomModifier function like what seems to be the default for v3? So when I’m dragging the box to zoom, if I leave the chart area, the box snaps to the edges of the chart, and upon mouse release, it zooms normally to the box.

I can provide an example: — broken (version 2.2.2404) — working (version 3.0.301)

Same exact code

import { SciChartSurface } from "scichart/Charting/Visuals/SciChartSurface";
import { NumericAxis } from "scichart/Charting/Visuals/Axis/NumericAxis";
import { XyDataSeries } from "scichart/Charting/Model/XyDataSeries";
import { FastLineRenderableSeries } from "scichart/Charting/Visuals/RenderableSeries/FastLineRenderableSeries";
import { MouseWheelZoomModifier } from "scichart/Charting/ChartModifiers/MouseWheelZoomModifier";
import { RubberBandXyZoomModifier } from "scichart/Charting/ChartModifiers/RubberBandXyZoomModifier";
import { ZoomExtentsModifier } from "scichart/Charting/ChartModifiers/ZoomExtentsModifier";

const dataX = [0, 10, 20, 30, 40, 50];
const dataY = [0, 10, 5, 20, 15, 35];

// eslint-disable-next-line

async function initSciChart() {
  const { sciChartSurface, wasmContext } = await SciChartSurface.create(

  const xAxis = new NumericAxis(wasmContext);
  const yAxis = new NumericAxis(wasmContext);

  const lineData = new XyDataSeries(wasmContext, {
    xValues: dataX,
    yValues: dataY

    new FastLineRenderableSeries(wasmContext, { dataSeries: lineData })

  sciChartSurface.chartModifiers.add(new MouseWheelZoomModifier({}));
  sciChartSurface.chartModifiers.add(new RubberBandXyZoomModifier({}));
  sciChartSurface.chartModifiers.add(new ZoomExtentsModifier({}));

  • You must to post comments

Hi Joao,

If I understand correctly, we have a behaviour in version 3.0.301 (latest version) which works correctly, but is broken in an older version – v2.2.2404 – is that correct?

If so, our official policy is that we only support the latest version of SciChart, if a bug is found in an older version of SciChart (but fixed in the latest) then we don’t publish updates to the older version. However, it may still be possible to find a workaround that you can apply by overriding the RubberBandXyZoomModifier.

Let me talk to the team and see if there’s something we can do. In the meantime, can your team / company prepare to migrate to SciChart.js v3? We would be happy to help you if there are any migration issues.

Best regards

  • You must to post comments


Yeah migrating is a plan for sure, we’re still studying the impact though.

In my first assessment I identified issues with using the browser zoom and the new text labels, they updated eventually, but lagged behind a bit. (Not sure if it still happens, I tried it out with the very first v3 release).

I may have found a workaround for this box zoom issue, but if your team has a “standard” way of doing it in v2, I’d like to know of course.

Thanks for the quick answers!

  • You must to post comments
Showing 2 results
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