Hi all,
I am looking to create a chart that looks like the image below using 0.9.12
JFreeChart seems to default to having the category labels right aligned so that they are just left of the bars themselves. But I need to make then left aligned like the image above..
Does anyone know how I can get a reference of this area of the chart and make the labels left aligned? Also, where should I start to do an annotation to the right of the labels to display the sub label "(xx)?
Thanks for all the help!
Jim
Left align labels in 0.9.12
did u try using the following or (combinations thereof) :
in ur code to get the positioning of the label ?
check out the following discussion :
http://www.jfree.org/phpBB2/viewtopic.php?t=5651
HTH
Code: Select all
labelAnchor = ItemLabelAnchor.INSIDE12;
textAnchor = TextAnchor.TOP_CENTER;
check out the following discussion :
http://www.jfree.org/phpBB2/viewtopic.php?t=5651
HTH
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
There isn't an option to control the alignment of the category labels, although it would be nice to have one.
As a workaround, you could modify the CategoryAxis class directly - the label coordinates are calculated in the refreshTicks(...) method.
As a workaround, you could modify the CategoryAxis class directly - the label coordinates are calculated in the refreshTicks(...) method.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program