Hi,
I am currently using the latest JFreeChart version 1.0.15. I would like to have some data presented on the bottom right of my graph. Unfortunately, I can only get the data to show up at the bottom of my graph, using the following code:
TextTitle statsText = new TextTitle("Overall Median = " + statistics.getSamplerMedian()
+ "\n Overall Average = " + statistics.getSamplerAverage()
+ "\n Overall Ninety-Fifth = " + statistics.getSamplerNinetyFifth()
+ "\n Overall Ninety-Ninth = " + statistics.getSamplerNinetyNinth());
statsText.setPosition(RectangleEdge.BOTTOM);
chart.addSubtitle(statsText);
Using RectangleEdge.BOTTOM puts a lot of text in the same area and clogs up the look of the graph. Preferably, I would like some of the data to be presented in the bottom right, as shown here:
So opposed to having the overall stats on the bottom, I would like them positioned in the open area to the bottom right. Having it left justified would also be optimal. Any way to achieve this?
Thanks in advance!
P.S. I have searched for an answer to this problem on google, the forums, and javadoc. However, I'm not quite sure how to word what I'm looking for.
EDIT: I have found a way to bring the data to the bottom right corner of the graph through the following post:
http://www.jfree.org/phpBB2/viewtopic.php?f=3&t=27968
Using statsText.setHorizontalAlignment(HorizontalAlignment.RIGHT); seemed to have almost cleared up my issue... The only two things I would like to change are getting the lines to be left justified and having the data on the same y-coordinates as the legend, and date that the test began. Currently, it looks like this:
There is still space being allocated in the bottom center of the graph for the overall stats, even though they are now at the bottom right. I have tried removing the chart.setPosition(RectangleEdge.Bottom) and putting chart.setVerticalAlignment(VerticalAlignment.BOTTOM), but that makes it end up showing on the top right instead..