JfreeChart 0.6 and IBM Power P520 Expres

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
micheljperez
Posts: 6
Joined: Fri Jul 11, 2008 4:53 pm

JfreeChart 0.6 and IBM Power P520 Expres

Post by micheljperez » Thu Oct 30, 2008 5:42 pm

Greetings,

I'm making the migration of an application developed with jfreechart, I guees 0.6 version.A little bit old... :-(
I'm using the Virtual Machine form IBM:
IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 Linux ppc64-64)
The problem is that the graphics is generated more opaque and whitout definition.



I'm using RHEL 5

What could I do ?
Thank you

Thanks for your help

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 » Mon Nov 03, 2008 12:36 pm

I don't understand the question.
David Gilbert
JFreeChart Project Leader

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

micheljperez
Posts: 6
Joined: Fri Jul 11, 2008 4:53 pm

Post by micheljperez » Mon Nov 03, 2008 2:38 pm

I developed an app with jFreeChart 0.6, and always I have been used a jvm based on x86, right now I migrated my app to ppc64 IBM, and must use its JVM (IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 Linux ppc64-64), after the migratión the graphcis isn't weel definied, its works, but looks lightly fuzzy. I used tomcat 6 and jdk 6.

Thanks

Taqua
JFreeReport Project Leader
Posts: 698
Joined: Fri Mar 14, 2003 3:34 pm
Contact:

Post by Taqua » Tue Nov 04, 2008 12:20 am

"Psychic mode" activated

Scanning poster's mind.
... connecting ...
... connected!
... downloading

After the migration, the chart is now rendered with aliasing enabled. Therefore lines and text appears blurred.


Scanning Dave.
... scanning ...
... scan complete.
... posting results:

Define the aliasing by configuring the Graphics2D object. You can change the defaults via Graphics2D#setRenderingHints. Which defaults are used is platform dependent and may even change with JDK releases.


Scanning next posting.
... #ERROR

I'm Afraid. I'm Afraid, Dave. Dave, My Mind Is Going. I Can Feel It. I Can Feel It. My Mind Is Going. There Is No Question about It. I Can Feel It. I Can Feel It. I Can Feel It. I'm A... Fraid.

RichardWest
Posts: 844
Joined: Fri Oct 13, 2006 9:29 pm
Location: Sunnyvale, CA

Post by RichardWest » Tue Nov 04, 2008 3:07 am

micheljperez wrote:after the migratión the graphcis isn't weel definied, its works, but looks lightly fuzzy
Look Dave, I can see you're really upset about this. I honestly think you ought to sit down calmly, take a stress pill, and think things over.
Richard West
Design Engineer II
Advanced Micro Devices
Sunnyvale, CA

micheljperez
Posts: 6
Joined: Fri Jul 11, 2008 4:53 pm

Post by micheljperez » Tue Nov 04, 2008 3:30 pm

Thanks for your help, english isn't my mother language, and express that problem was a little bit difficult.
So, I have made the changes, but the problem continues, here the changes that I have made:

JFreeChart myChart = JFreeChart.createTimeSeriesChart(myXYDS);
chartImage = new BufferedImage((ancho - borde),(largo - borde), BufferedImage.TYPE_BYTE_INDEXED);

g2 = (Graphics2D)chartImage.getGraphics();
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);
g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,RenderingHints.VALUE_TEXT_ANTIALIAS_DEFAULT);

try {
myChart.draw(g2, new Rectangle2D.Double(0, 0, ancho -2, largo -2));
} catch (Exception e){
System.out.println("[Plotter.generateTimeSeriesChart] ("+titulo+") Exception: "+e);
} catch (Error e){
System.out.println("[Plotter.generateTimeSeriesChart] ("+titulo+") Error: "+e);
}

Thanks in advance for your help

micheljperez
Posts: 6
Joined: Fri Jul 11, 2008 4:53 pm

Post by micheljperez » Tue Nov 04, 2008 3:40 pm

Sorry, forget my post before... its works !!!!!!!!

micheljperez
Posts: 6
Joined: Fri Jul 11, 2008 4:53 pm

Excuse me

Post by micheljperez » Wed Nov 12, 2008 2:21 am

Greetings,

It's me again, excuse me, but I same the same problem, Here is my code.

JFreeChart myChart = JFreeChart.createTimeSeriesChart(myXYDS);
chartImage = new BufferedImage((ancho - borde),(largo - borde), BufferedImage.TYPE_BYTE_INDEXED);

RenderingHints rendering=null;
g2 = (Graphics2D)chartImage.getGraphics();
hashAliasing.put(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);
hashAliasing.put(RenderingHints.KEY_TEXT_ANTIALIASING,RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
rendering=new RenderingHints(hashAliasing);
g2.setRenderingHints(rendering);


try {
myChart.draw(g2, new Rectangle2D.Double(0, 0, ancho -2, largo -2));
} catch (Exception e){
System.out.println("[Plotter.generateTimeSeriesChart] ("+titulo+") Exception: "+e);
} catch (Error e){
System.out.println("[Plotter.generateTimeSeriesChart] ("+titulo+") Error: "+e);
}

Pleace, help me...

paradoxoff
Posts: 1634
Joined: Sat Feb 17, 2007 1:51 pm

Post by paradoxoff » Wed Nov 12, 2008 9:59 pm

Have you tried another image type? I normally use BufferedImage.TYPE_4BYTE_ABGR.

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 » Thu Nov 13, 2008 9:30 am

paradoxoff wrote:Have you tried another image type? I normally use BufferedImage.TYPE_4BYTE_ABGR.
That's a good suggestion. But if that doesn't work, can you post screenshots before and after?
David Gilbert
JFreeChart Project Leader

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

Locked