Page 1 of 1

Paging Issue on Android

Posted: Thu May 03, 2012 2:12 pm
by 17062241
Hello,

I want to page previous/next through a multi-page bar chart.

When I page next, I can see the correct bar on the next page, but also see the bar from the previous page. They overlap each other.

e.g. chart.getChart().getPage().next();

I've seen paging bugs on other forums. Is this an known issue on Android? If so, is there a fix?

Regards,

Re: Paging Issue on Android

Posted: Fri May 04, 2012 11:59 am
by yeray
Hi,

I'm trying it with the following code and it seems to work fine for me here:

Code: Select all

        tChart1.getAspect().setView3D(false);

        Bar bar1 = new Bar(tChart1.getChart());
        bar1.fillSampleValues(20);
        
        tChart1.getPage().setMaxPointsPerPage(6);
        
        tChart1.addChartMouseListener(new ChartMouseListener() {
			
			@Override
			public void titleClicked(ChartMouseEvent arg0) {
			}
			
			@Override
			public void legendClicked(ChartMouseEvent arg0) {
			}
			
			@Override
			public void backgroundClicked(ChartMouseEvent arg0) {
				if (arg0.getPoint().x > tChart1.getWidth()/2)
					tChart1.getPage().next();
				else
					tChart1.getPage().previous();
			}
			
			@Override
			public void axesClicked(ChartMouseEvent arg0) {	
			}
		});
I may be missing some relevant setting to reproduce the problem. Could you please arrange a simple example project we can run as-is to reproduce the problem here?
Thanks in advance.