Hi,
I am using jfreechart 1.0.13, for my chart I need to have a custom number formater. The custom formater was working fine in Java version 1.7, we are in the process to upgrade Java to 1.8. While generating the chart the in Java 1.8 our number formatting is not applied in the chart.
Upon debugging from the NumberAxix.estimateMaximumTickLabelWidth method the call is not forwarded to our formater. But in 1.7 it was correctly executing our overriden format(double number,
StringBuffer toAppendTo,
FieldPosition pos)
method.
Please advice how to resolve this. Please let me know if more details are required.
Thanks,
Baiju
Number format override is not working in JDK 1.8
-
- Posts: 1634
- Joined: Sat Feb 17, 2007 1:51 pm
Re: Number format override is not working in JDK 1.8
NumberAxix.estimateMaximumTickLabelWidth does not call the method format(double number,StringBuffer toAppendTo,FieldPosition pos). The NumberFormat class does not appear to have changed between 7 and 8.
Are you sure that nothing else has changed?
Are you sure that nothing else has changed?
Re: Number format override is not working in JDK 1.8
Hi,
Thanks for your response, nothing else is changed in our code. While debugging from the NumberAxix.estimateMaximumTickLabelWidth method, our overrided method was executed in the Java 7, but in Java 8 our method was not called/executed. Not sure why.
The same code is working fine with Java 1.7.
Thanks,
Baiju
Thanks for your response, nothing else is changed in our code. While debugging from the NumberAxix.estimateMaximumTickLabelWidth method, our overrided method was executed in the Java 7, but in Java 8 our method was not called/executed. Not sure why.
The same code is working fine with Java 1.7.
Thanks,
Baiju
-
- Posts: 1634
- Joined: Sat Feb 17, 2007 1:51 pm
Re: Number format override is not working in JDK 1.8
If the same code is working under java 7, and not under java 8, I assume that it is a change or a bug in java 8.
You could create a NumberAxis and a Graphics2D (for example, by using the Graphics2D of a BufferedImage), then call the NumberAxix.estimateMaximumTickLabelWidth directly and floow with a debugger the methods that are being called.
You could create a NumberAxis and a Graphics2D (for example, by using the Graphics2D of a BufferedImage), then call the NumberAxix.estimateMaximumTickLabelWidth directly and floow with a debugger the methods that are being called.
-
- Posts: 513
- Joined: Wed Sep 12, 2007 3:18 pm