Pre loader

How to disable screen touch features?

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

0
0

Hi,
How can I programmatically prevent panning, zooming, yaw, pitch movements on the screen whenever I want?

Best regards…

Version
4.1.0
  • You must to post comments
0
0

Hi Mustafa,

You can disable separate modifiers by setting IsEnabled = false

Hope this will help you!

Best regards,
Yura

  • You must to post comments
0
0

Thanks for answer. I’am a begineer developer. Therefore it is difficult to understand. My init code is below. I want features such as pan, tilt, zoom to be disabled when I press a button in the application.

    public void initChart3D() {

    final SciChart3DBuilder sciChart3DBuilder = SciChart3DBuilder.instance();
    final Camera3D camera = sciChart3DBuilder.newCamera3D().build();

    NumericAxis3D xAxis = sciChart3DBuilder.newNumericAxis3D().withGrowBy(.1, .1).build();
    NumericAxis3D zAxis = sciChart3DBuilder.newNumericAxis3D().withGrowBy(.1, .1).build();
    NumericAxis3D yAxis = sciChart3DBuilder.newNumericAxis3D().withGrowBy(0, 2500).build();

    final int[] colors = new int[] { DarkBlue, CornflowerBlue, DarkGreen, Chartreuse, Yellow, Red};
    final float[] stops = new float[]{ 0.1f, 0.2f, 0.4f, 0.6f, 0.8f, 1};

    SurfaceMeshRenderableSeries3D rs1 = sciChart3DBuilder.newSurfaceMeshSeries3D()
            .withDataSeries(ds3d)
            .withDrawMeshAs(DrawMeshAs.SolidWireframe)
            .withStroke(0xFFE0E0E0)
            .withStrokeThicknes(1f)
            .withMaximum(5000)
            .withDrawSkirt(false)
            .withMeshColorPalette(new GradientColorPalette(colors, stops))
            .withOpacity(1.0f)
            .build();

    surface3d.setTheme(R.style.SciChart_ExpressionDarkStyle);
    surface3d.setCamera(camera);
    surface3d.setXAxis(xAxis);
    surface3d.setYAxis(yAxis);
    surface3d.setIsFpsCounterVisible(false);
    surface3d.setZAxis(zAxis);
    surface3d.getRenderableSeries().add(rs1);
    surface3d.getChartModifiers().add(sciChart3DBuilder.newModifierGroup()
            .withPinchZoomModifier3D().build()
            .build());

    setData3D();
}
//,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
public void setData3D()
{
    for(int i = 0; i<w; i++ )
    {
        for (int j = 0; j<h ; j++)
        {
            ds3d.updateYAt(i, j, voltaj_datalari[i][j]);
        }
    }
}

I also add the following code to the button onclick method but it doesn’t work.

zoomPanModifier.setIsEnabled(false);

Thank you very much for your help.

  • You must to post comments
0
0

Hi Mustafa,

It’s unclear for me how you get reference for PinchZoomModifier3D, if you define modifiers like this:

surface3d.getChartModifiers().add(sciChart3DBuilder.newModifierGroup()
        .withPinchZoomModifier3D().build()
        .build());

I would rewrite that code to create and store PinchZoomModifier3D instance outside in private variable, and then add it in modifier group like this:

 private PinchZoomModifier3D pinchZoomModifier = new PinchZoomModifier3D();

 surface3d.getChartModifiers().add(sciChart3DBuilder.newModifierGroup()
            .withModifier(pinchZoomModifier)
            .build());

In this case when you call:

pinchZoomModifier.setIsEnabled(false);

this will disable modifier instance which is used by chart.

Hope this will help you!

Best regards,
Yura

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