Label Alignement Problem with JDK 1.3.1 and earlier

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
gotti
Posts: 6
Joined: Sun May 02, 2004 2:22 pm

Label Alignement Problem with JDK 1.3.1 and earlier

Post by gotti » Tue May 04, 2004 1:53 pm

All horizontal Labels (Title, Tickvalues and Categorylabel) are by far too high if i use a jdk version earlier than 1.4. I know this doesnt happen if i use jdk 1.4.2 but is there a way to change the marging/ position of these labels - if so please show me how.

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 » Tue May 04, 2004 3:00 pm

One thing to try is flipping the value of the useFontMetricsGetStringBounds flag in the TextUtilities class. Change it somewhere near the start of your application before you draw your chart.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

astenwick
Posts: 13
Joined: Tue Apr 13, 2004 8:03 pm
Location: Seattle

Same problem - can't find flag

Post by astenwick » Wed May 05, 2004 9:16 pm

I've looked for the flag that you mentioned and cannot find it anywhere within the TextUtilities class or any of the org.jfree.text package. I'm having the same problems as well with JDK 1.3.1, all labels are drawn incorrectly and all titles and subtitles are not drawn at all. I've stepped through the code and the title heights are coming back as zero. Any other ideas?

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 » Wed May 05, 2004 9:46 pm

Which version are you using? My guess is 0.9.17, in which case you should give 0.9.18 a try. It has solved a lot of these problems for other people...
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

gotti
Posts: 6
Joined: Sun May 02, 2004 2:22 pm

Post by gotti » Thu May 06, 2004 8:42 am

Thank you David!
I implemented version 0.9.18 and now the allignement problem is fixed.

astenwick
Posts: 13
Joined: Tue Apr 13, 2004 8:03 pm
Location: Seattle

Post by astenwick » Fri May 07, 2004 11:20 pm

Fixed my problems too - thanks so much!

Locked