outline for the graph

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

outline for the graph

Post by Ann » Thu Aug 22, 2002 5:15 pm

I was wondering if there is any easy way to get the co-ordinates for the graph. The co-ordinates are the X and Y AXis being on the border of the rectangle. (i.e. the size of the chart less the space taken up by the Axis labels, chart title etc).

Thanks
Ann

josh

Re: outline for the graph

Post by josh » Thu Aug 22, 2002 8:48 pm

getMin/MaxValue() for the axes maybe?

David Gilbert

Re: outline for the graph

Post by David Gilbert » Fri Aug 23, 2002 6:55 am

When you call the draw(...) method in JFreeChart, you can pass in a ChartRenderingInfo object or null. If it is not null, it will collect information about the chart. The getDataArea() method returns the rectangle you are after, I think...

Regards,

DG.

Ann

Re: outline for the graph

Post by Ann » Fri Aug 23, 2002 11:12 am

Thanks David for your fast reply. Your solution worked fine.

Locked