SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components

0
0

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?

Version
1
  • You must to post comments
0
0

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

  • Alex N
    Thanks, Yura, for a fast answer. I will check this. Yes, I have some other modifiers: PinchZoomModifier, ZoomExtentsModifier. You are right, it’s better for me to understand whether they interfere with each other.
  • Alex N
    I removed other modifiers, but nothing changed. Probably will try to reproduce the issue in another project.
  • Alex N
    Yes, your code works as expected. A shake is experienced near left and right ends, but in whole it works.
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.

SciChart WPF v5 is here! Use the discount code SCICHARTV5 to get 15% off WPF Charts until December 31st!Read More
+