SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components
Hello!
I want the chart to scroll from right to left and stop at left side. Don’t automatically scale, don’t move right.
I have a modifier:
ZoomPanModifier zoomModifier = new ZoomPanModifier() { ... };
zoomModifier.setReceiveHandledEvents(true);
zoomModifier.setXyDirection(XyDirection.XDirection);
zoomModifier.setClipModeX(ClipMode.ClipAtExtents);
// zoomModifier.setClipModeX(ClipMode.ClipAtMin);
When I scroll a chart left to the beginning, it scales the chart to one screen. So, all points are visible, proportions are broken.
When I replace “ClipMode.ClipAtExtents” to “ClipMode.ClipAtMin”, it sometimes stops at left side (as desired), but if I swipe too fast, it shows a right part of the chart and continues to scroll left.
Currently a first version of the SciChart library is installed.
As written in https://www.scichart.com/documentation/android/v1.x/SciChart.Charting~com.scichart.charting.ClipMode.html both “ClipAtExtents” and “ClipAtMin” have another behaviour.
My question is similar to https://www.scichart.com/questions/question/disable-scaling-on-zoompanmodifier, but for Android.
Answer, please, is it a bug? Has it been already fixed or expected to be fixed?
Hi Alex,
Unfortunately I’m not aware of such bug and I’ve just to tried ClipAtExtents mode in one of examples from our demo application and everything worked as expected :
@Override
protected void initExample() {
final IAxis xAxis = sciChartBuilder.newNumericAxis().withVisibleRange(1.1, 2.7).build();
final IAxis yAxis = sciChartBuilder.newNumericAxis().withGrowBy(0.1d, 0.1d).build();
final DoubleSeries fourierSeries = DataManager.getInstance().getFourierSeries(1.0, 0.1, 5000);
final IXyDataSeries<Double, Double> dataSeries = sciChartBuilder.newXyDataSeries(Double.class, Double.class).build();
dataSeries.append(fourierSeries.xValues, fourierSeries.yValues);
final FastLineRenderableSeries rSeries = sciChartBuilder.newLineSeries().withDataSeries(dataSeries).withStrokeStyle(0xFF279B27).build();
UpdateSuspender.using(surface, new Runnable() {
@Override
public void run() {
Collections.addAll(surface.getXAxes(), xAxis);
Collections.addAll(surface.getYAxes(), yAxis);
Collections.addAll(surface.getRenderableSeries(), rSeries);
Collections.addAll(surface.getChartModifiers(), sciChartBuilder.newModifierGroup()
.withZoomPanModifier().withClipModex(ClipMode.ClipAtExtents).withXyDirection(Direction2D.XDirection).build()
.build());
}
});
}
Do you use some other modifiers except ZoomPanModifier in your application? Maybe they interfere with each other in some way? If no, then can you provide a code which reproduces this issue?
Best regards,
Yura
Please login first to submit.