so how do i implement multiple charts printing in one page?? I mean what should i do to the code, do i have to implement my own class or do i have to just change some lines of code, Some detail would be highly appreciated.
thanks
anup
how to print multiple graphs in one page
Re: how to print multiple graphs in one page
If your application has multiple charts that you want to print on one page, then you need to write some code in the print(...) method in whatever class you use to implement the Printable interface (part of the standard Java printing API).
If you look in the print(...) method for JFreeChartPanel, you will see that it just calculates a rectangle for the whole page, and then draws the chart in that rectangle. But if you have a class that has references to four charts (say) then you could calculate rectangles for each quarter page, and then draw each chart in it's own quarter. Each chart can occupy any area you want on the page...it is up to you to make sure they don't overlap.
Hope that helps,
DG.
If you look in the print(...) method for JFreeChartPanel, you will see that it just calculates a rectangle for the whole page, and then draws the chart in that rectangle. But if you have a class that has references to four charts (say) then you could calculate rectangles for each quarter page, and then draw each chart in it's own quarter. Each chart can occupy any area you want on the page...it is up to you to make sure they don't overlap.
Hope that helps,
DG.