Zoom rectangle flicker

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Ted Hill
Posts: 54
Joined: Mon Jun 12, 2006 7:39 pm

Zoom rectangle flicker

Post by Ted Hill » Thu Jan 28, 2010 4:06 pm

In my application, I call

ChartPanel.setMouseZoomable(true, true);

When using the mouse to zoom in on my chart data, the gray rectangle that indicates the zoom area occasionally flickers back and forth between gray and white.

I see that there is a post from 2002 titled "Interactive zooming problem" that also mentions this flicker issue.

Is there any way to prevent this?

FreeChart 1.0.13
Java 1.6.0_18-ea
Windows 7 64 bit
Ted Hill

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Re: Zoom rectangle flicker

Post by david.gilbert » Mon Feb 01, 2010 11:07 pm

It would be worth checking the value of the useBuffer flag that you pass to the ChartPanel constructor (it is true by default). I'd expect 'true' to give better results, at the expense of using more memory. When it is set to 'false', JFreeChart will use XOR mode to draw the zoom rectangle - that can be less than optimal.

Aside from that, I don't really know where the problem could lie.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

Locked