Hello People,
Please refer to this image here
http://www.flickr.com/photos/31066816@N05/2943009352/
I need to write some text notes in the left most part and it varies with depth( i.e. domain axis). Right now, I am creating an empty chart and then adding some text annotations (for description that I need to display) at corresponding X,Y. But I know, this solution is not going to work, especially when the 'Description' text is long (sometimes like a small paragraph) and the window size is small. How can get an image like shown in figure above? Is it possible to wrap text annotation added? Should I be using some thing like text layout etc. Or there is some other better way to do it? I was trying to read some articles/javadoc to see if there is a way, RangeMarkers/Domain Markers - will they work? I am really naive for JFreechart and Swings, but if this is the only way to do it, I guess, I will have to dig more into it.
Thank You everyone.
wrap for XYTextAnnotation - OR textLayout is the answer?
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
I would use the addDomainMarker() method to add these lines, but that will only get you single line labels. For the wrapping, you will have to modify the code (you might be able to reuse some of the text classes used for pie section labels to do wrapped labels).
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader

