i have a chart with an associated plot. the plot has an area which houses the data points and it has an area which houses the x and y axes.
what class.method will give me the the width/height of the space occupied by the axes (either as a proportion or an actual value) ??
if anyone can get me close, i'll find it from there...
plot border
plot border
i also used that but those give the upper and lower 'values' of the axes. i'm after the 'size' of the rectangle which holds the axes...
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
If you are displaying your chart in a ChartPanel, then this method returns a structure that contains information about the chart dimensions:
http://www.jfree.org/jfreechart/javadoc ... deringInfo()
If you are using some other method to display your chart, then you need to create a new ChartRenderingInfo object before drawing the chart, then pass this to the drawing method. For example, the saveChartAsPNG() method will accept such an object:
http://www.jfree.org/jfreechart/javadoc ... eringInfo)
When the method returns, the 'info' object is populated with the information you need.
http://www.jfree.org/jfreechart/javadoc ... deringInfo()
If you are using some other method to display your chart, then you need to create a new ChartRenderingInfo object before drawing the chart, then pass this to the drawing method. For example, the saveChartAsPNG() method will accept such an object:
http://www.jfree.org/jfreechart/javadoc ... eringInfo)
When the method returns, the 'info' object is populated with the information you need.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


plot border
david,
U DA MAN !!
got just what i needed.
thanks much !!
U DA MAN !!
got just what i needed.
thanks much !!
plot border revisited
it's been quite a while since this thread ran its course.
now, i am using cewolf and was wondering if there now exists a way to get the ChartRenderingInfo object 'post chart creation' as opposed to when the chart is being created ???
now, i am using cewolf and was wondering if there now exists a way to get the ChartRenderingInfo object 'post chart creation' as opposed to when the chart is being created ???