gorteganesh / achartengine

Automatically exported from code.google.com/p/achartengine
0 stars 0 forks source link

Panning stops working when fully panned to left #25

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Display a MultipleXY Line graph
2. Zoom in
3. Pan fully to the left
4. Try to pan to the right

What is the expected output? What do you see instead?
I expect the data to pan to the right, but that doesn't work. Before I pan 
fully to the left, I can also pan to the right..

What version of the product binary library are you using?
svn rev 97

Please provide any additional information below.
- I have set only X-panning and have set a limit for panning. The limit works, 
but stops working when panning to the left (to zero).
I don't know if I'm doing something wrong, or this is a bug..

Original issue reported on code.google.com by barry...@gmail.com on 22 Nov 2010 at 3:26

GoogleCodeExporter commented 9 years ago
I cannot replicate this one.
Can you please provide some source code that replicates this one?

Original comment by dandrome...@gmail.com on 26 Nov 2010 at 2:23

GoogleCodeExporter commented 9 years ago
It seems to happen when I set the mRenderer.setXAxisMax() function.

See the attached Main.java (tested with svn rev100).. When I zoom in, pan fully 
to the left, I can't go back to the right. When I comment out the setXAxisMax 
function, it is working correctly. Snippet from the code:

public void run() {
    int numRows = 200;

    mCurrentSeries.clear();
    Random rand = new Random();

    for (int i = 0; i <= numRows; i++) {
        mCurrentSeries.add(i, rand.nextInt(10));
    }

    mRenderer.setXAxisMin(0);
    mRenderer.setXAxisMax(numRows);

    double[] limits = new double[4];
    limits[0] = 0;
    limits[1] = numRows;
    limits[2] = 0;
    limits[3] = 10;
    mRenderer.setPanLimits(limits);

    if (mChartView != null) {
        mChartView.repaint();
    }
}

Original comment by barry...@gmail.com on 29 Nov 2010 at 8:58

Attachments:

GoogleCodeExporter commented 9 years ago
Good catch! There were 2 indexes typos.
Fixed in svn rev. r25.

Original comment by dandrome...@gmail.com on 3 Dec 2010 at 12:01