PDA

View Full Version : how to use charts in JFreeReport



Anonymous
08-09-2002, 12:13 AM
Hi,

I am having line charts, graphical charts within a JPanel. Can anybody suggest as to how to use the JPanel containing these charts for getting a preview in the JFreeReport. can i use any xml tags for referring to these charts and how??.

Chandra

Anonymous
08-09-2002, 05:55 PM
Hi,

this is a long planed feature, it WILL be implemented, but time is the current main problem. If you have the charts on a JPanel, try to create a java.awt.Image for that chart (using BufferedImage.getGraphics() and then a JPanel.paint()) for that purpose. Graphics-Objects can be displayed using the image-field tag, the image has to be supplied by the tablemodel. Use the Image-Function tag to supply the image using a function.

Have more fun,
said Thomas

Anonymous
08-13-2002, 05:46 AM
Hi,

I am not sure as to how to use the image-function tag. suggestion is needed regarding its usage with an example.

Chandra

Anonymous
08-13-2002, 03:33 PM
Hi,

I'll construct an example for that ...

have more fun,
said Thomas

Anonymous
08-14-2002, 05:18 PM
Hi,

a new example exists showing how to create and print an java.awt.Image from within a function. The report definition is report2a.xml and the new element is located in the page header (suppressed on the first page!).

The example functions draws some Swing-Components and some text into an BufferedImage and serves this to an ImageElement.

All files can be found in the cvs.

Have more fun,
said Thomas