Changing height of plot

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
David Patrick

Changing height of plot

Post by David Patrick » Sun Jan 12, 2003 5:02 am

I have a line chart with over 20 lines. I'm displaying the chart on a web page via a servlet.

When I take the default values (requesting a legend) the actual chart is squeezed by the size of the legend so most of the lines are not distinguishable. I need to change the y-axis height to spread out the plotted lines so then can be seen. I don't want to remove the legend but instead change the overall height of the drawn object.

I can't find this in the doc (which I've purchased) and am going blind chasing the javadoc.

David Patrick

Re: Changing height of plot

Post by David Patrick » Sun Jan 12, 2003 4:06 pm

Never mind :-) By changing the y-dimension of the generated PNG I got the effect I wanted

David Gilbert

Re: Changing height of plot

Post by David Gilbert » Mon Jan 13, 2003 4:41 pm

OK, glad you found a solution. Another thing to note is that you can change the position of the legend:

Legend legend = myChart.getLegend();
legend.setAnchor(Legend.EAST);

That will sometimes help.

Regards,

Dave Gilbert

Locked