A discussion forum for JFreeChart (a 2D chart library for the Java platform).
-
Jim D
- Posts: 8
- Joined: Wed Sep 10, 2003 6:31 am
- Location: Silicon Valley CA
-
Contact:
Post
by Jim D » Fri Sep 26, 2003 12:42 am
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
-
dshah
- Posts: 24
- Joined: Wed Sep 17, 2003 2:07 pm
Post
by dshah » Fri Sep 26, 2003 10:50 am
did u try using the following or (combinations thereof) :
Code: Select all
labelAnchor = ItemLabelAnchor.INSIDE12;
textAnchor = TextAnchor.TOP_CENTER;
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
-
david.gilbert
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
-
Contact:
Post
by david.gilbert » Fri Sep 26, 2003 10:54 am
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.