The demo that I downloaded with JFreeChart has the vertical labels overlapping the y-axis tick numbers in XY plots (I am running on a PC with Windows 98). This also occurs in my XY plots in my application.
Is there any way to avoid this.
Thank-you, Marilyn
Vertical label overlaps axes
RE: Vertical label overlaps axes
Hi Marilyn,
Sorry to hear that you are having trouble with JFreeChart.
It would help me to diagnose the problem if you could send me a screen copy of the chart showing the problem (PNG/GIF/JPEG or whatever) and also some details of the Java Virtual Machine version you are running (the demo program includes a frame that displays all the information - just copy and paste that if you can).
Regards,
DG.
Sorry to hear that you are having trouble with JFreeChart.
It would help me to diagnose the problem if you could send me a screen copy of the chart showing the problem (PNG/GIF/JPEG or whatever) and also some details of the Java Virtual Machine version you are running (the demo program includes a frame that displays all the information - just copy and paste that if you can).
Regards,
DG.
RE: Vertical label overlaps axes
It must be 1.4beta 2 or windows 2000
Frank
awt.toolkit sun.awt.windows.WToolkit
file.encoding Cp1252
file.encoding.pkg sun.io
file.separator \
java.awt.fonts
java.awt.graphicsenv sun.awt.Win32GraphicsEnvironment
java.awt.printerjob sun.awt.windows.WPrinterJob
java.class.path jfreechart.jar
java.class.version 48.0
java.ext.dirs C:\Program Files\JavaSoft\JRE\1.4\lib\ext
java.home C:\Program Files\JavaSoft\JRE\1.4
java.io.tmpdir C:\DOCUME~1\FRANKS~1\LOCALS~1\Temp\
java.library.path C:\WINNT\system32;.;C:\WINNT\System32;C:\WINNT;C:\WINNT\system32;C:\WINNT;C:\WINNT\system32\WBEM;c:\java\jdk1.4\bin;C:\PROGRA~1\F-Secure\SSHTRI~1\Program;C:\PalmDev\pilrc-2.7b;C:\cygnus\cygwin-b20\H-i586-cygwin32\bin;C:\cygnus\PRC-Tools\H-i586-cygwin32\bin
java.runtime.name Java(TM) 2 Runtime Environment, Standard Edition
java.runtime.version 1.4.0-beta2-b77
java.specification.name Java Platform API Specification
java.specification.vendor Sun Microsystems Inc.
java.specification.version 1.4
java.util.prefs.PreferencesFactory java.util.prefs.WindowsPreferencesFactory
java.vendor Sun Microsystems Inc.
java.vendor.url http://java.sun.com/
java.vendor.url.bug http://java.sun.com/cgi-bin/bugreport.cgi
java.version 1.4.0-beta2
java.vm.info mixed mode
java.vm.name Java HotSpot(TM) Client VM
java.vm.specification.name Java Virtual Machine Specification
java.vm.specification.vendor Sun Microsystems Inc.
java.vm.specification.version 1.0
java.vm.vendor Sun Microsystems Inc.
java.vm.version 1.4.0-beta2-b77
line.separator
os.arch x86
os.name Windows 2000
os.version 5.0
path.separator ;
sun.arch.data.model 32
sun.boot.class.path C:\Program Files\JavaSoft\JRE\1.4\lib\rt.jar;C:\Program Files\JavaSoft\JRE\1.4\lib\i18n.jar;C:\Program Files\JavaSoft\JRE\1.4\lib\sunrsasign.jar;C:\Program Files\JavaSoft\JRE\1.4\lib\jsse.jar;C:\Program Files\JavaSoft\JRE\1.4\lib\jce.jar;C:\Program Files\JavaSoft\JRE\1.4\lib\charsets.jar;C:\Program Files\JavaSoft\JRE\1.4\classes
sun.boot.library.path C:\Program Files\JavaSoft\JRE\1.4\bin
sun.cpu.endian little
sun.cpu.isalist pentium i486 i386
sun.io.unicode.encoding UnicodeLittle
sun.os.patch.level
user.country US
user.dir C:\java\Chart\jfreechart-0.5.6
user.home C:\Documents and Settings\Frank Stanbach
user.language en
user.name Frank Stanbach
user.timezone America/Los_Angeles
user.variant
Frank
awt.toolkit sun.awt.windows.WToolkit
file.encoding Cp1252
file.encoding.pkg sun.io
file.separator \
java.awt.fonts
java.awt.graphicsenv sun.awt.Win32GraphicsEnvironment
java.awt.printerjob sun.awt.windows.WPrinterJob
java.class.path jfreechart.jar
java.class.version 48.0
java.ext.dirs C:\Program Files\JavaSoft\JRE\1.4\lib\ext
java.home C:\Program Files\JavaSoft\JRE\1.4
java.io.tmpdir C:\DOCUME~1\FRANKS~1\LOCALS~1\Temp\
java.library.path C:\WINNT\system32;.;C:\WINNT\System32;C:\WINNT;C:\WINNT\system32;C:\WINNT;C:\WINNT\system32\WBEM;c:\java\jdk1.4\bin;C:\PROGRA~1\F-Secure\SSHTRI~1\Program;C:\PalmDev\pilrc-2.7b;C:\cygnus\cygwin-b20\H-i586-cygwin32\bin;C:\cygnus\PRC-Tools\H-i586-cygwin32\bin
java.runtime.name Java(TM) 2 Runtime Environment, Standard Edition
java.runtime.version 1.4.0-beta2-b77
java.specification.name Java Platform API Specification
java.specification.vendor Sun Microsystems Inc.
java.specification.version 1.4
java.util.prefs.PreferencesFactory java.util.prefs.WindowsPreferencesFactory
java.vendor Sun Microsystems Inc.
java.vendor.url http://java.sun.com/
java.vendor.url.bug http://java.sun.com/cgi-bin/bugreport.cgi
java.version 1.4.0-beta2
java.vm.info mixed mode
java.vm.name Java HotSpot(TM) Client VM
java.vm.specification.name Java Virtual Machine Specification
java.vm.specification.vendor Sun Microsystems Inc.
java.vm.specification.version 1.0
java.vm.vendor Sun Microsystems Inc.
java.vm.version 1.4.0-beta2-b77
line.separator
os.arch x86
os.name Windows 2000
os.version 5.0
path.separator ;
sun.arch.data.model 32
sun.boot.class.path C:\Program Files\JavaSoft\JRE\1.4\lib\rt.jar;C:\Program Files\JavaSoft\JRE\1.4\lib\i18n.jar;C:\Program Files\JavaSoft\JRE\1.4\lib\sunrsasign.jar;C:\Program Files\JavaSoft\JRE\1.4\lib\jsse.jar;C:\Program Files\JavaSoft\JRE\1.4\lib\jce.jar;C:\Program Files\JavaSoft\JRE\1.4\lib\charsets.jar;C:\Program Files\JavaSoft\JRE\1.4\classes
sun.boot.library.path C:\Program Files\JavaSoft\JRE\1.4\bin
sun.cpu.endian little
sun.cpu.isalist pentium i486 i386
sun.io.unicode.encoding UnicodeLittle
sun.os.patch.level
user.country US
user.dir C:\java\Chart\jfreechart-0.5.6
user.home C:\Documents and Settings\Frank Stanbach
user.language en
user.name Frank Stanbach
user.timezone America/Los_Angeles
user.variant
RE: Vertical label overlaps axes
The problem exhibits itself with JVM 1.3.0_02 (ships w/JBuilder5).
Works fine under 1.3.0-C and J2RE 1.3.0 IBM build ca130-20010330 (AIX).
Works fine under 1.3.0-C and J2RE 1.3.0 IBM build ca130-20010330 (AIX).
RE: Vertical label overlaps axes
I face the same problem with the demo (jfreechart-0.7.1). I have JBuilder5 on Win2000 machine.
Is there a workaround for this?
(I can e-mail the image is you would like.)
Thanks in advance.
Is there a workaround for this?
(I can e-mail the image is you would like.)
Thanks in advance.
RE: Vertical label overlaps axes
The hack we came up with was in com.jrefinery.chart.VerticalNumberAxis's draw method. After it defines 'xx' in the 'if (verticalLabel) {' block we put:
// hack around a bug in JBuilder5's JDK:
String version = System.getProperty("java.version");
if (version.equals("1.3.0_02") || version.startsWith("1.4"))
xx -= labelBounds.getHeight() / 2;
Note that I don't know if this works with the latest version....
// hack around a bug in JBuilder5's JDK:
String version = System.getProperty("java.version");
if (version.equals("1.3.0_02") || version.startsWith("1.4"))
xx -= labelBounds.getHeight() / 2;
Note that I don't know if this works with the latest version....