Zoom doesn't display lines if no points inside zoom area

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
pdvmipv
Posts: 13
Joined: Tue Mar 18, 2008 11:11 am

Zoom doesn't display lines if no points inside zoom area

Post by pdvmipv » Wed Nov 18, 2009 4:19 pm

I've added some XYseries in a XYSeriesCollection on a XYLineChart.
Zoom doesn't display lines if there aren't points of the XYseries inside the zoom area, even if a line (between two point outside the area) intersect the Zoom Area.

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

Re: Zoom doesn't display lines if no points inside zoom area

Post by david.gilbert » Wed Nov 18, 2009 9:21 pm

Can you reproduce this with any of the demo programs in JFreeChart 1.0.13 (e.g. using the web start demo on the JFreeChart home page)? I couldn't. Is there a specific renderer you are using? Can you post a small self-contained demo?
David Gilbert
JFreeChart Project Leader

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

pdvmipv
Posts: 13
Joined: Tue Mar 18, 2008 11:11 am

Re: Zoom doesn't display lines if no points inside zoom area

Post by pdvmipv » Thu Nov 19, 2009 10:02 am

In my code I've used this renderer:

renderer = (XYLineAndShapeRenderer) plot.getRenderer(0);
renderer.setDrawSeriesLineAsPath(true);

plotDataset.addSeries(serieDati);
renderer.setSeriesShapesVisible(nserie, false);
renderer.setSeriesPaint(nserie, Color.BLACK);
renderer.setSeriesStroke(nserie, new BasicStroke(0.01f));

It seems that in the WebStart examples which use this renderer
ther's not this problem but, I presume, I don't make anythig strange
in my code.

mkivinie
Posts: 51
Joined: Wed Jul 06, 2005 8:35 am

Re: Zoom doesn't display lines if no points inside zoom area

Post by mkivinie » Thu Nov 19, 2009 10:13 am

Could it be that your JFreeChart is version 1.0.10 or older?
See http://www.jfree.org/phpBB2/viewtopic.p ... 510#p73510

If the answer is yes, either update your JFreeChart libraries or alternatively do this

Code: Select all

renderer.setDrawSeriesLineAsPath(false);

pdvmipv
Posts: 13
Joined: Tue Mar 18, 2008 11:11 am

Re: Zoom doesn't display lines if no points inside zoom area

Post by pdvmipv » Thu Nov 19, 2009 4:10 pm

I'm using jfreechart-1.0.13, the problem persists even if I put the setDrawSeriesLineAsPath to false

Locked