Disable Zoom but keep Pan enabled in achartengine android

I am trying to disable pinch zoom but still keep the pan for x true, so that I can scroll in the x axis to see my values

renderer.setPanEnabled(true, false); renderer.setZoomEnabled(false, false);

This is not working. Zoom still seems to work and is not disabled. Any suggestions will be highly appreciated ?

Here is the code snippet :

public class PerformanceGraph {

public View getView(Context context, List<SessionData> sessionDataList,int filterViewTotalShots) {

    int Y_MAX = (filterViewTotalShots*10);
    int Y_MIN = 0;
    int PADDING = (int)(Y_MAX*0.05);

    XYMultipleSeriesRenderer seriesRenderer = new XYMultipleSeriesRenderer();
    XYMultipleSeriesDataset dataset = new XYMultipleSeriesDataset();

    // Adding the Goal Series
    Integer goalScore = new GoalDatabase(context).GetGoalScore(filterViewTotalShots);
    XYSeries lineGoal = new XYSeries("Goal");
    lineGoal.add(0, goalScore);
    if(sessionDataList.size() == 0){
        lineGoal.add(0, goalScore);
    }
    else {
        lineGoal.add(sessionDataList.size()-1, goalScore);
    }

    dataset.addSeries(lineGoal);

    XYSeriesRenderer lineGoalRenderer = new XYSeriesRenderer();
    lineGoalRenderer.setChartValuesSpacing(1f);
    lineGoalRenderer.setColor(Color.rgb(140, 131, 131)); // #8c8383
    lineGoalRenderer.setLineWidth(2f);      
    seriesRenderer.addSeriesRenderer(lineGoalRenderer);     

    // Adding Score Series
    TimeSeries series = new TimeSeries("Scores");
    for(int i=0;i<sessionDataList.size();i++) {         
        SessionData data = sessionDataList.get(i);

        series.add(i, data.getTotalScore());
        series.addAnnotation(Utils.customFormattedDate(data.getDate()), i, Y_MIN - (2*PADDING) );

        // Creating line series to draw vertical lines
        XYSeries line = new XYSeries("Line");
        line.add(i, Y_MIN);
        line.add(i, Y_MAX);
        line.addAnnotation( data.getTotalScore() + "", i, Y_MAX + PADDING);

        dataset.addSeries(line);

        XYSeriesRenderer lineRenderer = new XYSeriesRenderer();
        lineRenderer.setChartValuesSpacing(1f);
        lineRenderer.setColor(Color.rgb(135, 38, 36)); // #7d2624
        lineRenderer.setLineWidth(2f);

        lineRenderer.setAnnotationsColor(Color.rgb(140, 131, 131)); // #8c8383
        lineRenderer.setAnnotationsTextSize(22f);

        seriesRenderer.addSeriesRenderer(lineRenderer);
    }
    dataset.addSeries(series);

    XYSeriesRenderer renderer = new XYSeriesRenderer();
    renderer.setPointStyle(PointStyle.CIRCLE);
    renderer.setFillPoints(true);
    renderer.setColor(Color.WHITE);
    renderer.setLineWidth(4f);

    renderer.setAnnotationsColor(Color.GRAY);
    renderer.setAnnotationsTextSize(22f);

    seriesRenderer.addSeriesRenderer(renderer);

    seriesRenderer.setShowAxes(false);
    seriesRenderer.setShowLegend(false);
    seriesRenderer.setShowLabels(false);
    seriesRenderer.setZoomButtonsVisible(false);
    seriesRenderer.setPanEnabled(true, false);
    seriesRenderer.setZoomEnabled(false, false);
    seriesRenderer.setMargins(new int[] {0, 0, 0, 0});

    seriesRenderer.setXAxisMin(-1);
    seriesRenderer.setXAxisMax(10);

    seriesRenderer.setYAxisMin(Y_MIN - (3*PADDING));
    seriesRenderer.setYAxisMax(Y_MAX + (3*PADDING));

    seriesRenderer.setPointSize(10f);

    seriesRenderer.setTextTypeface(Typeface.createFromAsset(context.getAssets(), "fonts/Lifestyle Rounded M54.ttf"));

    View view = ChartFactory.getLineChartView(context, dataset, seriesRenderer);

    return view;
}

}

Means this the answer (as u commented) .I am writing it here so that it can help others.

seriesRenderer.setPanEnabled(true, false);
seriesRenderer.setZoomEnabled(false, false);
What Others Are Reading