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:
https://8tunzo.csb.app/ — broken (version 2.2.2404)
https://umvryi.csb.app/ — 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
SciChartSurface.useWasmFromCDN();
async function initSciChart() {
const { sciChartSurface, wasmContext } = await SciChartSurface.create(
"scichart-root"
);
const xAxis = new NumericAxis(wasmContext);
const yAxis = new NumericAxis(wasmContext);
sciChartSurface.xAxes.add(xAxis);
sciChartSurface.yAxes.add(yAxis);
const lineData = new XyDataSeries(wasmContext, {
xValues: dataX,
yValues: dataY
});
sciChartSurface.renderableSeries.add(
new FastLineRenderableSeries(wasmContext, { dataSeries: lineData })
);
sciChartSurface.chartModifiers.add(new MouseWheelZoomModifier({}));
sciChartSurface.chartModifiers.add(new RubberBandXyZoomModifier({}));
sciChartSurface.chartModifiers.add(new ZoomExtentsModifier({}));
}
initSciChart();
- João Velasques asked 1 month ago
- last edited 1 month ago
- You must login 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
Andrew
- Andrew Burnett-Thompson answered 1 month ago
- You must login to post comments
Hello,
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!
- João Velasques answered 1 month ago
- You must login to post comments
Please login first to submit.