How can i print charts

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
memonono
Posts: 5
Joined: Wed Jun 23, 2004 2:54 pm

How can i print charts

Post by memonono » Sun Jun 27, 2004 3:53 pm

i have charts added in a JComponent (JPanel)
How can i print them

i tried to print them >>> they are comming in one page
and the colors are allmost transparent

but when i use the right click on a chart
it prints ok

can anyone show me how can i use
the built in mehtod inside the JChartPanel
in my own JComponent

DopeForADay
Posts: 32
Joined: Thu Apr 22, 2004 9:15 am

Post by DopeForADay » Tue Jun 29, 2004 9:04 am

Some sample code would be helpful in order to better understand the given context of your problem.
However, if you add chartpanels to your panel, you could access them by a getChild() method and then call their createChartPrinterJob() method.

nicky
Posts: 44
Joined: Mon Apr 05, 2004 1:45 am
Location: Brisbane, Australia

Post by nicky » Tue Jun 29, 2004 10:43 pm

otherwise you can print to PDF using the iText Library. http://www.lowagie.com/iText/

Nicky

Locked